Evaluates whether a real number is a valid representation of a date (date/time object).
True, if the parameter represents a valid date/time object; False, otherwise.
IsNumericDate(number)
Parameter |
Description |
|---|---|
number |
A real number |
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 '2003-01-14 10:04:13'} return True, because ColdFusion converts valid date string formats to date/time objects, which are real numbers.
<cfscript>
date = IsNumericDate(now());
writeOutput("Is date is represented in a valid date format: " & date & "<br/>");
</cfscript>
Output
Is date is represented in a valid date format: YES
Sign in to your account