Whatever message this page gives is out now! Go check it out!

CreateODBCTime

Last update:
May 18, 2026

Description

Creates an ODBC time object.

Returns

A time object, in ODBC timestamp format.

Category

Function syntax

CreateODBCTime(date)

See also

CreateODBCDateTimeCreateTimeEvaluation and type conversion issues in Data type conversion in the Developing ColdFusion Applications

Parameters

Parameter
Description
date
Date/time object in the range 100 AD-9999 AD.

Usage

When passing a date-time value as a string, enclose it in quotation marks. Otherwise, it is interpreted as a number representation of a date-time object.

Example

<cfscript>
    year = 2018;
    month = 11;
    day = 02;
    hour = 1;
    minute= 09;
    second= 46;
    myDate=CreateDateTime(year,month,day,hour,minute,second)
    format=CreateODBCTime(myDate)
    writeOutput("Time format is : " & format)
</cfscript>
Output
Time format is : {t '01:09:46'}

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page