Creates a date/time object.
A date/time value.
CreateDate(year, month, day)
CreateDateTime, CreateODBCDateTime; Evaluation and type conversion issues in Data type conversion in the Developing ColdFusion Applications
Parameter |
Description |
|---|---|
year |
Integer in the range 0-9999. Integers in the range 0-29 are converted to 2000-2029. Integers in the range 30-99 are converted to 1930-1999. You cannot specify dates before AD 100. |
month |
Integer in the range 1 (January)-12 (December) |
day |
Integer in the range 1-31 |
CreateDate is a subset of CreateDateTime.The time in the returned object is set to 00:00:00.
<cfscript>
year = 2018;
month = 11;
day = 02;
myDate=CreateDate(year,month,day)
writeOutput("The date is: " & myDate);
</cfscript>
Output
The date is: {ts '2018-11-02 00:00:00'}
Sign in to your account