Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EclipseLink » EQL / JPQL Operator -datepart- Usage
EQL / JPQL Operator -datepart- Usage [message #989728] Fri, 07 December 2012 12:59 Go to next message
Volkan Demircan is currently offline Volkan DemircanFriend
Messages: 1
Registered: December 2012
Junior Member
Hi,

I would like to ask about how to use DatePart with OPERATOR which comes with EclipseLink 2.4?

I specifically need dayofyear property. I have searched through documentations but could not find any detailed explanation.

Thanks for your help.

[Updated on: Fri, 07 December 2012 14:13]

Report message to a moderator

Re: EQL / JPQL Operator -datepart- Usage [message #990298 is a reply to message #989728] Tue, 11 December 2012 18:22 Go to previous message
James Sutherland is currently offline James SutherlandFriend
Messages: 1939
Registered: July 2009
Location: Ottawa, Canada
Senior Member

You may also be able to use EXTRACT,

EXTRACT(DAYOFYEAR, e.startDate)

For OPERATOR use,

OPERATOR('DatePart', e.startDate, 'DAYOFYEAR')

You could also use SQL('DATEPART(DAYOFYEAR, ?)', e.startDate)



James : Wiki : Book : Blog : Twitter
Previous Topic:query a subpart of complex graph and get a smallest object
Next Topic:Objects still exists after commit
Goto Forum:
  


Current Time: Fri Apr 26 11:34:51 GMT 2024

Powered by FUDForum. Page generated in 0.03073 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top