Evaluates the "real value" of a date/time object.
True, if number represents "real value" of a date/time object; otherwise, False.
Date and time functions, Decision functions
IsNumericDate(number)
Parameter | Description |
---|---|
number |
A real number |
<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"> <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>