User Guide Cancel

IsDateObject

 

Description

Determines whether a value is a date/time object.

The difference between IsDateObject and IsDate is that isDate returns true for date/time objects as well as date/time strings.

Returns

True, if the value is a ColdFusion date/time object; False if the value is any other type of data, such as an integer, string, or struct. ColdFusion converts the Boolean return value to its string equivalent, "Yes" or "No."

History

  • ColdFusion (2016 release) Update 3: Added the function.

Category

Syntax

IsDateObject(value)
IsDateObject(value)
IsDateObject(value)

See also

Parameters

Parameter

Description

value

Value of the date object.

Example

<cfscript>
date = IsDateObject(now());
writeOutput("Can string be converted to a date/time value : " & date);
</cfscript>
<cfscript> date = IsDateObject(now()); writeOutput("Can string be converted to a date/time value : " & date); </cfscript>
<cfscript>
    date = IsDateObject(now());
    writeOutput("Can string be converted to a date/time value : " & date);
</cfscript>

Output

Can string be converted to a date/time value : YES

Get help faster and easier

New user?