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 07:59 Go to next message
Volkan Demircan is currently offline Volkan Demircan
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 09:13]

Report message to a moderator

Re: EQL / JPQL Operator -datepart- Usage [message #990298 is a reply to message #989728] Tue, 11 December 2012 13:22 Go to previous message
James Sutherland is currently offline James Sutherland
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: Mon Apr 21 05:52:31 EDT 2014

Powered by FUDForum. Page generated in 0.01628 seconds