<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>PARSEDATETIME</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">PARSEDATETIME</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>
Parses a date/time string according to the English (U.S.) locale conventions. (To format a date/time string for other locales, use the LSParseDateTime function.) 
</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 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">Category</span>
<p>
Date and time functions, Display and formatting 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>ParseDateTime(date/time-string [, pop-conversion ] ) 
</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>
IsDate, IsNumericDate, SetLocale
</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>
This function is similar to CreateDateTime, but it takes a string instead of enumerated date/time values. These functions are provided primarily to increase the readability of code in compound expressions.
</p>

<p>
To calculate a difference between time zones, use the GetTimeZoneInfo function. 
</p>

<p>
To set the default display format of date, time, number, and currency values, use the SetLocale function. 
</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;ParseDateTime Example&lt;/h3&gt;
&lt;cfif IsDefined(&quot;form.theTestValue&quot;)&gt;
   &lt;cfif IsDate(form.theTestValue)&gt;
       &lt;h3&gt;The expression &lt;cfoutput&gt;#DE(form.theTestValue)#&lt;/cfoutput&gt; is a valid 
date&lt;/h3&gt;
       &lt;p&gt;The parsed date/time is:
           &lt;cfoutput&gt;#ParseDateTime(form.theTestValue)#&lt;/cfoutput&gt;
   &lt;cfelse&gt;
       &lt;h3&gt;The expression &lt;cfoutput&gt;#DE(form.theTestValue)#&lt;/cfoutput&gt; is not a 
valid date&lt;/h3&gt;
   &lt;/cfif&gt;
&lt;/cfif&gt;

&lt;form action=&quot;#CGI.ScriptName#&quot; method=&quot;POST&quot;&gt;
&lt;p&gt;Enter an expression, and discover if it can be evaluated to a date value.
&lt;input type=&quot;Text&quot; name=&quot;TheTestValue&quot; value=&quot;&lt;CFOUTPUT&gt;#DateFormat(Now())#
     #TimeFormat(Now())#&lt;/CFOUTPUT&gt;&quot;&gt;
&lt;input type=&quot;Submit&quot; value=&quot;Parse the Date&quot; name=&quot;&quot;&gt;
&lt;/form&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="DATE/TIME STRING">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">DATE/TIME STRING</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>A string containing a date/time value formatted according to U.S. locale conventions. Can represent a date/time in the range 100 AD-9999 AD. Years 0-29 are interpreted as 2000-2029; years 30-99 are interpreted as 1930-1999.</p>

  </td>
  </tr>
  </table>
</div>
<div id="POP-CONVERSION">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">POP-CONVERSION</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>

<ul>

<li>pop: specifies that the date/time string is in POP format, which includes the local time of the sender and a time-zone offset from UTC. ColdFusion applies the offset and returns a value with the UTC time.</li>

<li>standard: (the default) function does no conversion.</li>
</ul>


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

  </body>
</html>
