Returns a time object in ODBC time format.
CreateODBCTime(date)
CreateODBCDateTime,
CreateTime
Parameter |
Description |
---|---|
date |
Date/time object in the period 100 AD-9999 AD |
When passing a date/time value as a string, enclose it in quotes. Otherwise, it is interpreted as a number representation of a date/time object.
<!--- This code illustrates CreateTime and CreateODBCTime ---> <html> <head> <title>CreateODBCTime Example</title> </head> <body bgcolor = silver> <H3>CreateODBCTime Example</H3> <cfif IsDefined("FORM.hour")> Your time value, presented using different CF time functions: <cfset yourTime = CreateTime(FORM.hour, FORM.minute, FORM.second)> <cfoutput> <UL> <LI>Built with CreateTime: #TimeFormat(yourTime)# <LI>Built with CreateODBCTime: #CreateODBCTime(yourTime)# </UL> <P>The same value can be formatted with timeFormat: <UL> <LI>Built with CreateTime: #TimeFormat(yourTime, 'hh:mm:ss')# <LI>Built with CreateODBCTime: #TimeFormat(yourTime, 'hh:mm:sstt')# </UL> </cfoutput> </cfif> <cfform action = "createodbctime.cfm" method = "post"> <PRE> Hour <cfinput type = "Text" name = "hour" value = "16" RANGE = "0,23" message = "You must enter an hour (0-23)" validate = "integer" required = "Yes"> Minute <cfinput type = "Text" name = "minute" value = "12" RANGE = "0,59" message = "You must enter a minute value (0-59)" validate = "integer" required = "Yes"> Second <cfinput type = "Text" name = "second" value = "0" RANGE = "0,59" message = "You must enter a value for seconds (0-59)" validate = "integer" required = "Yes"> </PRE> <P><input type = "Submit" name = ""> <input type = "RESET"> </cfform> </body> </html>