Chapter 2: ColdFusion Functions
311
CreateTime
Returns a valid time variable in ColdFusion.
See also
CreateODBCTime
and
CreateDateTime
.
Syntax
CreateTime
(
hour, minute, second)
hour
Number representing the hour, ranging from 0 to 23.
minute
Number representing the minute, ranging from 0 to 59.
second
Number representing the second, ranging from 0 to 59.
Usage
CreateTime is a subset of
CreateDateTime
.
Time variables are special cases of date/time variables. The date portion of a time
variable is set to December 30, 1899.
Examples
<!--- This code illustrates CreateTime and CreateODBCTime --->
<HTML>
<HEAD>
<TITLE>
CreateTime Example
</TITLE>
</HEAD>
<basefont face="Arial, Helvetica" size=2>
<body bgcolor="#FFFFD5">
<H3>CreateTime 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>
Содержание COLDFUSION 4.5-CFML LANGUAGE
Страница 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Страница 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Страница 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Страница 296: ...272 CFMLLanguageReference INPUT TYPE text NAME number2 BR INPUT TYPE submit NAME submit VALUE Add FORM BODY HTML...
Страница 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Страница 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Страница 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Страница 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Страница 557: ...Chapter 2 ColdFusion Functions 533 P CFOUTPUT Value i is employee keysToStruct i CFOUTPUT P CFLOOP CFIF BODY HTML...
Страница 584: ...560 CFMLLanguageReference...
Страница 594: ...570 CFMLLanguageReference...