Edit

Share via


ISDATETIME

Applies to: Calculated column Calculated table Measure Visual calculation

Checks whether a value is a date / time, and returns TRUE or FALSE.

Syntax

ISDATETIME(<value>)

Parameters

Term Definition
value The value you want to test.

Return value

TRUE if the value is a date / time; otherwise FALSE.

Remarks

  • This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.

Example

The following DAX query shows the behavior of ISDATETIME.

EVALUATE
{
    IF ( ISDATETIME ( 42 ), "Is datetime", "Is not datetime" ), // RETURNS: Is not datetime
    IF ( ISDATETIME ( "42" ), "Is datetime", "Is not datetime" ), // RETURNS: Is not datetime
    IF ( ISDATETIME ( "2025-07-01" ), "Is datetime", "Is not datetime" ), // RETURNS: Is not datetime
    IF ( ISDATETIME ( dt"2025-07-01" ), "Is datetime", "Is not datetime" ), // RETURNS: Is datetime
    IF ( ISDATETIME ( DATE ( 2025, 7, 1 ) ), "Is datetime", "Is not datetime" ) // RETURNS: Is datetime
}