createDateTime

Creates a date-time object.

createDateTime(year, month, day, hour, minute, second) → returns date

createDateTime Argument Reference

year numeric
Required

Integer in the range 0-9999. When in the range 0-29, year is converted to 2000-2029. When in the range 30-99, year is converted to 1930-1999. You cannot specify dates before AD 100.

month numeric
Required
Default: 1

Numeric month of the year (1-12). CF 2016+ Optional

day numeric
Required
Default: 1

Day of the month. CF 2016+ Optional

hour numeric
Required
Default: 0

Hour of the day in 24-hour notation (0-23). CF 2016+ Optional

minute numeric
Required
Default: 0

Minute within the hour. CF 2016+ Optional

second numeric
Required
Default: 0

Second within the minute. CF 2016+ Optional

millisecond numeric
Default: 0

timezone numeric

Examples sample code invoking the createDateTime function

<cfset yourDate = createDateTime("2015", "12", "09", "6", "20", "34")> 
 <cfdump var="#yourDate#" />     

Fork me on GitHub