Creates an ODBC date object.
A date object, in normalized ODBC date format.
CreateODBCDate(date)
CreateDate, CreateODBCDateTime
Parameter |
Description |
|---|---|
date |
Date or date/time object in the range 100 AD-9999 AD. |
This function does not parse or validate values. To ensure that dates are entered and processed correctly (for example, to ensure that a day/month/year entry is not confused with a month/day/year entry, and so on), Adobe recommends that you parse entered dates with the DateFormat function, using the mm-dd-yyyy mask, into three elements. Ensure that values are within appropriate ranges; for example, to validate a month value, use the attributes validate = "integer" and range = "1,12".
<cfscript>
year = 2018;
month = 11;
day = 02;
hour = 1;
minute= 09;
second= 46;
myDate=CreateDateTime(year,month,day,hour,minute,second)
format=CreateODBCDate(myDate)
writeOutput("Date format is : " & format);
</cfscript>
Output
Date format is : {d '2018-11-02'}
Sign in to your account