DateDiff

"-->
 DateDiff (" datepart" , " date1" , " date2") 

Description

Determines the number of units by which date1 is less than date2. datepart can be one of the following; yyyy, year; q, quarter; m, month; y, day of year; d, day; w, weekday; ww, week; h, hour; n, minute; s, second.

Example

 <cfset exampleDate1 = dateformat(now(), 'mm/dd/yyyy')>  <cfset exampleDate2 = "12/25/2001">  <cfoutput>  How many weeks since Christmas: #DateDiff("ww", exampleDate1, exampleDate2)#  </cfoutput>  


Inside ColdFusion MX
Inside Coldfusion MX
ISBN: 0735713049
EAN: 2147483647
Year: 2005
Pages: 579

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net