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 / createodbctime.cfm < prev    next >
Encoding:
Text File  |  2001-06-13  |  1.3 KB  |  42 lines

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