Skip to content

IsNullDateTime

See Also: Time and Date Functions

Purpose

Determines if a DateTime value is null, i.e., empty.

Return Type

Boolean

Syntax

(IsNullDateTime({DateTime}))

Where:

  • {DateTime} is a value of type DateTime.

Example

Procedure TestIsNullDateTime
    DateTime dtVal

    If (IsNullDateTime(dtVal)) Begin
        Showln "It's originally a null DateTime"
    End
    Else Begin
        Showln "It's originally not a null DateTime"
    End

    Showln "Setting DateTime variable to current local time"
    Move (CurrentDateTime()) to dtVal

    If (IsNullDateTime(dtVal)) Begin
        Showln "It's still a null DateTime"
    End
    Else Begin
        Showln "Now it's no longer a null DateTime"
    End
End_Procedure

Notes

IsNullDateTime returns true if the value of the DateTime argument is null. This is the recommended way to test if a DateTime variable is "empty" (i.e., null).