home *** CD-ROM | disk | FTP | other *** search
/ Australian Personal Computer 1999 April / APC443.iso / features / grpware / coldfus / coldfusi.exe / data1.cab / Documentation / snippets / createtime.cfm < prev    next >
Encoding:
Text File  |  1998-10-08  |  1.3 KB  |  41 lines

  1. <!--- This code illustrates CreateTime and CreateODBCTime --->
  2. <HTML>
  3. <HEAD>
  4. <TITLE>
  5. CreateTime Example
  6. </TITLE>
  7. </HEAD>
  8.  
  9. <BODY bgcolor=silver>
  10. <H3>CreateTime Example</H3>
  11.  
  12. <CFIF IsDefined("form.hour")>
  13. Your time value, presented using different CF time functions:
  14. <CFSET yourTime = #CreateTime("#form.hour#","#form.minute#","#form.second#")#>
  15.  
  16. <CFOUTPUT>
  17. <UL>
  18.     <LI>Built with CreateTime: #TimeFormat("#yourTime#")#
  19.     <LI>Built with CreateODBCTime: #CreateODBCTime("#yourTime#")#
  20. </UL>
  21.  
  22. <P>The same value can be formatted with timeFormat:
  23. <UL>
  24.     <LI>Built with CreateTime: #TimeFormat("#yourTime#", 'hh:mm:ss')#
  25.     <LI>Built with CreateODBCTime: #TimeFormat("#yourTime#", 'hh:mm:sstt')#
  26. </UL>    
  27. </CFOUTPUT>
  28. </CFIF>
  29.  
  30. <CFFORM action="createtime.cfm" METHOD="post">
  31. <PRE>
  32. Hour    <CFINPUT TYPE="Text" NAME="hour" VALUE="16" RANGE="0,23" MESSAGE="You must enter an hour (0-23)" VALIDATE="integer" REQUIRED="Yes">
  33. Minute    <CFINPUT TYPE="Text" NAME="minute" VALUE="12" RANGE="0,59" MESSAGE="You must enter a minute value (0-59)" VALIDATE="integer" REQUIRED="Yes">
  34. 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">
  35. </PRE>
  36. <P><INPUT TYPE="Submit" NAME=""> <INPUT TYPE="RESET">
  37. </CFFORM>
  38.  
  39. </BODY>
  40. </HTML>       
  41.