User Guide
326 CFML Language Reference
Examples <!--- This example shows the various types of output
possible with DateFormat --->
<HTML>
<HEAD>
<TITLE>
DateFormat Example
</TITLE>
</HEAD>
<CFSET todayDate = Now()>
<BODY>
<H3>DateFormat Example</H3>
<P>Today’s date is <CFOUTPUT>#todayDate#</CFOUTPUT>.
<P>Using DateFormat, we can display that date in a number of
different ways:
<CFOUTPUT>
<UL>
<LI>#DateFormat(todayDate)#
<LI>#DateFormat(todayDate, "mmm-dd-yyyy")#
<LI>#DateFormat(todayDate, "mmmm d, yyyy")#
<LI>#DateFormat(todayDate, "mm/dd/yyyy")#
<LI>#DateFormat(todayDate, "d-mmm-yyyy")#
<LI>#DateFormat(todayDate, "ddd, mmmm dd, yyyy")#
<LI>#DateFormat(todayDate, "d/m/yy")#
</UL>
</CFOUTPUT>
</BODY>
</HTML>