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 (2018 release): Changed parameter name value to dateobject.
  • ColdFusion (2016 release) Update 3: Added the function.

Category

Syntax

IsDateObject(value)

See also

Parameters

Parameter

Description

value

A value, typically the name of a variable.

Example

<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

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy