<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>CREATEODBCTIME</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
   <div id="Description">
   <table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
      <tr> 
         <td valign="top" class="name">CREATEODBCTIME</td>
         <td valign="top" nowrap class="compatibility">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
      </tr>


    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Description</span>
<p>
Creates an ODBC time object.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Returns</span>
<p>
A time object, in ODBC timestamp format.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Category</span>
<p>
Date and time functions
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Function syntax</span><pre>CreateODBCTime(date)
</pre>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">See also</span>
<p>
CreateODBCDateTime, CreateTime, "Evaluation and type conversion issues" in Chapter&#160;3, "Using ColdFusion Variables," in ColdFusion MX Developer's Guide
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Parameters</span>
<p>

</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Usage</span>
<p>
When passing a date-time value as a string, you must enclose it in quotation marks. Otherwise, it is interpreted as a number representation of a date-time object.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Example</span><pre>&lt;h3&gt;CreateODBCTime Example&lt;/h3&gt;
&lt;CFIF IsDefined(&quot;form.hour&quot;)&gt;
Your time value, created with CreateTime...
&lt;CFSET yourTime = CreateTime(form.hour, form.minute, form.second)&gt;
&lt;cfoutput&gt;
&lt;ul&gt;
   &lt;li&gt;Formatted with CreateODBCTime: #CreateODBCTime(yourTime)#
   &lt;li&gt;Formatted with TimeFormat: #TimeFormat(yourTime)#
&lt;/ul&gt;&lt;/cfoutput&gt;
&lt;/CFIF&gt;
&lt;CFFORM action=&quot;createodbctime.cfm&quot; METHOD=&quot;post&quot;&gt;
&lt;PRE&gt;
Hour      &lt;CFINPUT TYPE=&quot;Text&quot; NAME=&quot;hour&quot; VALUE=&quot;16&quot; RANGE=&quot;0,23&quot; MESSAGE=&quot;You must
enter an hour (0-23)&quot; VALIDATE=&quot;integer&quot; REQUIRED=&quot;Yes&quot;&gt;
Minute      &lt;CFINPUT TYPE=&quot;Text&quot; NAME=&quot;minute&quot; VALUE=&quot;12&quot; RANGE=&quot;0,59&quot; MESSAGE=&quot;You 
must
enter a minute value (0-59)&quot; VALIDATE=&quot;integer&quot; REQUIRED=&quot;Yes&quot;&gt;
Second      &lt;CFINPUT TYPE=&quot;Text&quot; NAME=&quot;second&quot; VALUE=&quot;0&quot; RANGE=&quot;0,59&quot; MESSAGE=&quot;You 
must
enter a value for seconds (0-59)&quot; VALIDATE=&quot;integer&quot; REQUIRED=&quot;Yes&quot;&gt;
&lt;/PRE&gt;
&lt;p&gt;&lt;INPUT TYPE=&quot;Submit&quot; NAME=&quot;&quot;&gt; &lt;INPUT TYPE=&quot;RESET&quot;&gt;
&lt;/cfform&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="DATE">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">DATE</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>


<p>Date/time object in the range 100 AD-9999 AD.</p>

  </td>
  </tr>
  </table>
</div>

  </body>
</html>
