User Guide
536 Chapter 3: ColdFusion Functions
#DateFormat(CreateDateTime(form.year, form.month, form.day, form.hour,
form.minute, form.second))#
<li>Formatted with CreateODBCDate and DateFormat:
#DateFormat(CreateODBCDate(yourDate), "mmmm d, yyyy")#
<li>Formatted with CreateODBCDateTime and DateFormat:
#DateFormat(CreateODBCDateTime(yourDate), "d/m/yy")#
</ul>
</cfoutput>
</cfif>
<cfform action="createodbcdate.cfm" method="POST">
<p>Enter the year, month and day, as integers:
<pre>
Year <cfinput type="text" name="year" value="1998" validate="integer"
required="yes">
Month<cfinput type="text" name="month" value="6" range="1,12"
message="please enter a month (1-12)" validate="integer"
REQUIRED="Yes">
Day <cfinput type="text" name="day" value="8" range="1,31"
MESSAGE="Please enter a day of the month (1-31)" VALIDATE="integer"
REQUIRED="Yes">
Hour <cfinput type="text" name="hour" value="16" range="0,23"
MESSAGE="You must enter an hour (0-23)" VALIDATE="integer"
REQUIRED="Yes">
Minute<cfinput type="text" name="minute" value="12" range="0,59"
MESSAGE="You must enter a minute value (0-59)" VALIDATE="integer"
REQUIRED="Yes">
Second<cfinput type="text" name="second" value="0" range="0,59"
MESSAGE="You must enter a value for seconds (0-59)" VALIDATE="integer"
REQUIRED="Yes">
</PRE>
<p><INPUT TYPE="Submit" NAME=""> <INPUT TYPE="RESET">
</cfform>