MACROMEDIA COLDFUSION MX 61-CFML Reference page 442

Cfml reference
Hide thumbs Also See for COLDFUSION MX 61-CFML:
Table of Contents

Advertisement

<h3><cfoutput>#DateFormat(FORM.date1)#
#TimeFormat(FORM.date1)#</cfoutput> (Date 1) is equal
to <cfoutput>#DateFormat(FORM.date2)#
#TimeFormat(FORM.date2)#</cfoutput> (Date 2)</h3>
<I>The dates are equal!</I>
</cfcase>
<cfcase value = "1">
<h3><cfoutput>#DateFormat(FORM.date1)#
#TimeFormat(FORM.date1)#</cfoutput> (Date 1) is later
than <cfoutput>#DateFormat(FORM.date2)#
#TimeFormat(FORM.date2)#</cfoutput> (Date 2)</h3>
<I>The dates are not equal</I>
</cfcase>
<cfdefaultcase>
<h3>This is the default case</h3>
</cfdefaultcase>
</cfswitch>
<cfelse>
<h3>Enter two valid date values</h3>
</cfif>
</cfif>
<form action = "datecompare.cfm">
<hr size = "2" color = "#0000A0">
<p>Date 1
<br><input type = "Text" name = "date1"
value = "<cfoutput>#DateFormat(Now())# #TimeFormat(Now())#
</cfoutput>">
<p>Date 2
<br><input type = "Text" name = "date2"
value = "<cfoutput>#DateFormat(Now())# #TimeFormat(Now())#
</cfoutput>">
<p>Specify precision to the:
<br><select name = "precision">
<option value = "s">
Second
</option>
<option value = "n">
Minute
</option>
<option value = "h">
Hour
</option>
<option value = "d">
Day
</option>
<option value = "m">
Month
</option>
<option value = "yyyy">
Year
</option>
</select>
<p><input type = "Submit" value = "Compare these dates" name = "">
<input type = "reset">
</form>
442
Chapter 3: ColdFusion Functions

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion mx

Table of Contents