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

evaluate a date

Status
Not open for further replies.

gtbikerider

Technical User
May 22, 2001
81
0
0
GB
I want to show an event only if it's in the future, so I used...

<cfif #Dateformat(NOW(),"dd mm yyyy")# LTE "10 02 2006">
This is an event that occurs on 2nd Oct 2006
</cfif>

However I also only want to only show it, if it's less than (say) 60 days in the future - how would I evaluate the date in that way?

--
John
 
You want to set a variable to the date Now() + 60 and then use that variable in your LTE comparison.
 
make sure to put these dates in the query where they should be too.

i'm pretty sure all the db's can do date_add and date_diff, etc..with the proper syntax of course.

and drop the date format for NOW(). date format is not needed for comparisons in CFML

Kevin

Phase 1: Read the CFML Reference
Phase 2: ???
Phase 3: Profit!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top