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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Difference Between Two Dates 1

Status
Not open for further replies.

ChiTownDiva

Technical User
Jan 24, 2001
273
US
I need to figure out how to pull records based on the following concept:

{End_Date} - CurrentDate) >= 60

Can someone help me?

Thanks in advance.

ChiTownDivaus [ponytails2]
 
To accomplish this and pass the SQL to the database, try something like:

Report->Edit Selection Formula->Record:

{Table.End_Date} >= currentdate-60

Check the Database->Show SQL Query to make sure that it's getting passed to the database, if not, you may have to construct a datetime to compare with, since you didn't share the database type nor data type (date or datetime), it's impossible to know, you may need:

{Table.End_Date} >= cdatetime(year(currentdate-60),month(currentdate-60),day(currentdate-60),0,0,0)

One or both should work.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top