Chapter 2: ColdFusion Functions
299
CreateDateTime
Returns a valid date/time object.
See also
CreateDate
,
CreateTime
,
CreateODBCDateTime
, and
Now
.
Syntax
CreateDateTime
(
year, month, day, hour, minute, second)
year
Number representing the year in the range 100–9999.
month
Number representing the month of the year, ranging from 1 (January) to 12
(December).
day
Number representing the day of the month, ranging from 1 to 31.
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
Years from 0 to 29 are interpreted as 21
st
century values. Years 30 to 99 are interpreted
as 20
th
century values.
Examples
<!--- This example shows how to use CreateDateTime --->
<HTML>
<HEAD>
<TITLE>
CreateDateTime Example
</TITLE>
</HEAD>
<BODY BGCOLOR=silver>
<H3>CreateDateTime Example</H3>
<CFIF IsDefined("form.year")>
Your date value, presented using different CF date functions:
<CFSET yourDate = CreateDateTime(form.year, form.month, form.day,
form.hour, form.minute, form.second)>
<CFOUTPUT>
<UL>
<LI>Built with CreateDate:
#CreateDate(form.year, form.month,form.day)#
Summary of Contents for COLDFUSION 4.5-CFML LANGUAGE
Page 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Page 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Page 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Page 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Page 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Page 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Page 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Page 584: ...560 CFMLLanguageReference...
Page 594: ...570 CFMLLanguageReference...