home *** CD-ROM | disk | FTP | other *** search
/ Chip 2002 February / CHIPCD_02_2002.iso / Internet / Macromedia ColdFusion Server 5 / coldfusion-50-win-us.exe / data1.cab / Examples / CFDOCS / snippets / timeformat.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  702 b   |  35 lines

  1. <!--- This example shows the various types of output
  2. possible with TimeFormat --->
  3.  
  4. <HTML>
  5.  
  6. <HEAD>
  7. <TITLE>
  8. TimeFormat Example
  9. </TITLE>
  10. </HEAD>
  11.  
  12. <CFSET todayDate = Now()>
  13. <BASEFONT FACE="Arial, Helvetica" SIZE=2>
  14. <BODY  bgcolor="#FFFFD5">
  15.  
  16. <H3>TimeFormat Example</H3>
  17.  
  18. <P>Today's date is <CFOUTPUT>#todayDate#</CFOUTPUT>.
  19.  
  20. <P>Using Timeformat, we can display that date/time value
  21. in a number of different ways:
  22. <CFOUTPUT>
  23. <UL>
  24.     <LI>#TimeFormat(todayDate)#
  25.     <LI>#TimeFormat(todayDate, 'hh:mm:ss')#
  26.     <LI>#TimeFormat(todayDate, 'hh:mm:sst')#
  27.     <LI>#TimeFormat(todayDate, 'hh:mm:sstt')#
  28.     <LI>#TimeFormat(todayDate, 'HH:mm:ss')#
  29. </UL>    
  30.     
  31. </CFOUTPUT>    
  32. </BODY>
  33.  
  34. </HTML>       
  35.