<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>CREATEDATE</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">CREATEDATE</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 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">Returns</span>
<p>
A date/time value.
</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>CreateDate(year, month, day)
</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>
CreateDateTime, CreateODBCDate; "Date-time functions and queries when ODBC is not supported" 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>
CreateDate is a subset of CreateDateTime.
</p>

<p>
The time in the returned object is set to 00:00:00.
</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;CreateDate Example&lt;/h3&gt;
&lt;CFIF IsDefined(&quot;form.year&quot;)&gt;
&lt;p&gt;Your date value, generated with CreateDate:
&lt;CFSET yourDate = CreateDate(form.year, form.month, form.day)&gt;
&lt;cfoutput&gt;
&lt;ul&gt;
   &lt;li&gt;Formatted with CreateDate: #CreateDate(form.year, form.month, form.day)#
   &lt;li&gt;Formatted with CreateDateTime: #CreateDateTime(form.year, form.month,
form.day, 12,13,0)#
   &lt;li&gt;Formatted with CreateODBCDate: #CreateODBCDate(yourDate)#
   &lt;li&gt;Formatted with CreateODBCDateTime: #CreateODBCDateTime(yourDate)#
&lt;/ul&gt;

&lt;p&gt;The same value can be formatted with DateFormat:
&lt;ul&gt;
   &lt;li&gt;Formatted with CreateDate and DateFormat: 
         #DateFormat(CreateDate(form.year, form.month, form.day), &quot;mmm-dd-
yyyy&quot;)#
   &lt;li&gt;Formatted with CreateDateTime and DateFormat: 
         #DateFormat(CreateDateTime(form.year, form.month, form.day, 12,13,0))#
   &lt;li&gt;Formatted with CreateODBCDate and DateFormat: 
         #DateFormat(CreateODBCDate(yourDate), &quot;mmmm d, yyyy&quot;)#
   &lt;li&gt;Formatted with CreateODBCDateTime and DateFormat: 
         #DateFormat(CreateODBCDateTime(yourDate), &quot;d/m/yy&quot;)#
&lt;/ul&gt;
&lt;/cfoutput&gt;
&lt;/CFIF&gt;
&lt;CFFORM ACTION=&quot;createdate.cfm&quot; METHOD=&quot;POST&quot;&gt;
&lt;p&gt;Enter the year, month and day, as integers:
&lt;PRE&gt;
Year   &lt;CFINPUT TYPE=&quot;Text&quot; NAME=&quot;year&quot; VALUE=&quot;1998&quot; VALIDATE=&quot;integer&quot; 
      REQUIRED=&quot;Yes&quot;&gt;
Month   &lt;CFINPUT TYPE=&quot;Text&quot; NAME=&quot;month&quot; VALUE=&quot;6&quot; VALIDATE=&quot;integer&quot; 
      REQUIRED=&quot;Yes&quot;&gt;
Day   &lt;CFINPUT TYPE=&quot;Text&quot; NAME=&quot;day&quot; VALUE=&quot;8&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="YEAR">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">YEAR</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>Integer in the range 0-9999. Integers in the range 0-29 are converted to 2000-2029. Integers in the range 30-99 are converted to 1930-1999. You cannot specify dates before AD 100.</p>

  </td>
  </tr>
  </table>
</div>
<div id="MONTH">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">MONTH</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>Integer in the range 1 (January)-12 (December)</p>

  </td>
  </tr>
  </table>
</div>
<div id="DAY">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">DAY</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>Integer in the range 1-31</p>

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

  </body>
</html>
