DatePart

"-->
 DatePart ("datepart", "date") 

Description

This returns part of a date as a number. datepart can be one of the following; yyyy, year; q, quarter; m, month; y, day of year; d,day;w, weekday; ww, seek; h, hour; n, minute; s, second.

Example

 <cfset exampleDate = now()>  <cfoutput>    year: #DatePart("yyyy", exampleDate)#    quarter: #DatePart("q", exampleDate)#    month: #DatePart("m", exampleDate)#    day of year: #DatePart("y", exampleDate)#    day: #DatePart("d", exampleDate)#    weekday: #DatePart("w", exampleDate)#    week: #DatePart("ww", exampleDate)#    hour: #DatePart("h", exampleDate)#    minute: #DatePart("n", exampleDate)#    second: #DatePart("s", exampleDate)#  </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