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

CreateTime

Last update:
May 18, 2026

Description

Creates a time variable.

Returns

A time variable.

Category

Function syntax

CreateTime(hour, [minute, second])

See also

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

Parameters

Parameter
Description
hour
Number in the range 0-23
minute
Number in the range 0-59
second
Number in the range 0-59

Usage

CreateTime is a subset of CreateDateTime.A time variable is a special case of a date-time variable. The date part of a time variable is set to December 30, 1899.

Example

<cfscript>
    hour = 1;
    minute= 09;
    second= 46;
    myTime=CreateTime(hour,minute,second)
    writeOutput("Time is : " & myTime)
</cfscript>
Output
Time is : {ts '1899-12-30 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