Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Out of range problem with CurrentDate 1

Status
Not open for further replies.

JetRamsey

Technical User
Joined
Oct 22, 2010
Messages
49
Location
US
Works - {TABLE1.FIELD1} < DateTime (CurrentDate - (365 * 20))
Does not work {TABLE1.FIELD1} < DateTime (CurrentDate - (365.25 * 20))

I'm querying a datetime field and trying to give the user the ability to same X amount of years. In this example, 20 years. Thus, I'm using CurrentDate - (365.25 * 20). Unfortunately, the report will accept 365, but not 365.25). Is there another way to calculate X number of years than trying 365.25 * X number of years?

I'm using CR version 14 and viewing an Oracle DB

 
You can use the DateAdd function.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top