IsNumericDate

Description

Evaluates "real value" of date/time object. Returns TRUE if the number represents "real value" of the date/time object; otherwise, FALSE.

Category

Decision functions

Syntax

IsNumericDate(number) 

See also

IsDate, ParseDateTime

Parameters

Parameter
Description
number
Real number

Example

<!--- This example shows the use of IsNumericDate --->
<html>
<head>
<title>IsNumericDate Example</title>
</head>
<body bgcolor = silver>
<H3>IsNumericDate Example</H3>
<cfif IsDefined("FORM.theTestValue")>
<!--- test if the value is Numeric or a pre-formatted Date value --->
  <cfif IsNumeric(FORM.theTestValue) or IsDate(FORM.theTestValue)>
<!--- if this value is a numericDate value, then pass --->
    <cfif IsNumericDate(FORM.theTestValue)>
    <H3>The string <cfoutput>#DE(FORM.theTestValue)#</cfoutput> 
     is a valid numeric date</H3>
    <cfelse>
    <H3>The string <cfoutput>#DE(FORM.theTestValue)#</cfoutput> 
     is not a valid numeric date</H3>
    </cfif>
  <cfelse>
  <H3>The string <cfoutput>#DE(FORM.theTestValue)#</cfoutput> 
   is not a valid numeric date</H3>
  </cfif>
</cfif>
<form action = "isNumericDate.cfm" method = "POST">
<P>Enter a string, and discover if it can be evaluated to a date value.
<P><input type = "Text" name = "TheTestValue" value = "<cfoutput>#Now()#
 </cfoutput>">
<input type = "Submit" value = "Is it a Date?" name = "">
</FORM>
</body>
</html>