DateAdd

"-->
 DateAdd ("datepart", number, "date") 

Description

Adds units of time to a date. 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 exampleDate = now()>  <cfoutput>  Add 1 day to our current date:  #DateFormat(DateAdd('d', 1, exampleDate),  'mm/dd/yyyy')#  Subtract 1 day from our current date:  #DateFormat(DateAdd('d', -1, exampleDate),  'mm/dd/yyyy')#  </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