<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>ISNUMERICDATE</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">ISNUMERICDATE</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>
Evaluates whether a real number is a valid representation of a date (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>
True, if the parameter represents a valid date/time object; False, otherwise.
</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, Decision 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>IsNumericDate(number)
</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, ParseDateTime
</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>
ColdFusion, by default, evaluates any input parameter and attempts to convert it to a real number before it passes the parameter to the IsNumericDate function. As a result, parameter values such as 12/12/03 and {ts &#39;2003-01-14 10:04:13&#39;} return True, because ColdFusion converts valid date string formats to date/time objects, which are real numbers.
</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;IsNumericDate Example&lt;/h3&gt;
&lt;cfif IsDefined(&quot;form.theTestValue&quot;)&gt;
&lt;!--- test if the value represents a number or a pre-formatted Date value ---&gt;

   &lt;cfif IsNumeric(form.theTestValue) or IsDate(form.theTestValue)&gt;
&lt;!--- if this value is a numericDate value, then pass ---&gt;
      &lt;cfif IsNumericDate(form.theTestValue)&gt;
         &lt;h3&gt;The string &lt;cfoutput&gt;#DE(form.theTestValue)#&lt;/cfoutput&gt; can be 
converted to a valid numeric date&lt;/h3&gt;
      &lt;cfelse&gt;
         &lt;h3&gt;The string &lt;cfoutput&gt;#DE(form.theTestValue)#&lt;/cfoutput&gt; can not be 
converted to a valid numeric date&lt;/h3&gt;
      &lt;/cfif&gt;
   &lt;cfelse&gt;
      &lt;h3&gt;The string &lt;cfoutput&gt;#DE(form.theTestValue)#&lt;/cfoutput&gt; is not a valid 
numeric date&lt;/h3&gt;
   &lt;/cfif&gt;

&lt;/cfif&gt;

&lt;form action=&quot;#cgi.script_name#&quot; method=&quot;POST&quot;&gt;
&lt;p&gt;Enter a value, and discover if it can be evaluated to a date value.
&lt;p&gt;
&lt;input type=&quot;Text&quot; name=&quot;TheTestValue&quot; value=&quot;&lt;CFOUTPUT&gt;#Now()#&lt;/CFOUTPUT&gt;&quot;&gt;
&lt;input type=&quot;Submit&quot; value=&quot;Is it a Date?&quot; name=&quot;&quot;&gt;
&lt;/form&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="NUMBER">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">NUMBER</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 real number</p>

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

  </body>
</html>
