Description

Creates a time variable.

Returns

A time variable.

Category

Date and time functions

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'}

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy