316
CFML Language Reference
<P>This example uses DateAdd to determine when a message in
the database will expire. (The value selected is messages older
than <CFOUTPUT>#value#
<CFSWITCH EXPRESSION=#type#>
<CFCASE VALUE="yyyy">years</CFCASE>
<CFCASE VALUE="q">quarters</CFCASE>
<CFCASE VALUE="m">months</CFCASE>
<CFCASE VALUE="y">days of year</CFCASE>
<CFCASE VALUE="w">weekdays</CFCASE>
<CFCASE VALUE="ww">weeks</CFCASE>
<CFCASE VALUE="h">hours</CFCASE>
<CFCASE VALUE="n">minutes</CFCASE>
<CFCASE VALUE="s">seconds</CFCASE>
<CFDEFAULTCASE>years</CFDEFAULTCASE>
</CFSWITCH>
</CFOUTPUT>).
<TABLE>
<TR>
<TD>UserName</TD>
<TD>Subject</TD>
<TD>Posted</TD>
</TR>
<CFOUTPUT query="GetMessages">
<TR>
<TD>#UserName#</TD>
<TD>#Subject#</TD>
<TD>#Posted# <CFIF DateAdd(type, value,
posted) LT Now()>EXPIRED</CFIF></TD>
</TR>
</CFOUTPUT>
</TABLE>
...
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...