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).

day numeric
Required
Default: 1

Day of the month.

hour numeric
Required
Default: 0

Hour of the day in 24-hour notation (0-23).

minute numeric
Required
Default: 0

Minute within the hour.

second numeric
Required
Default: 0

Second within the minute.

millisecond numeric
Default: 0

timezone numeric

Compatibility

ColdFusion:

Version 6+ Since CF2016+ month, day, hour, minute are second are optional

Examples sample code invoking the createDateTime function

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

Fork me on GitHub