Answers for "vba check if date = 00:00:00"

C#
0

vba check if date = 00:00:00

Function IsNullDate(ByVal d As Date) As Boolean
    If d = CDate("00:00:00") Then
        IsNullDate = True
    Else
        IsNullDate = False
    End If
End Function

Sub CheckDate()
    Dim d1, d2 As Date
    d1 = Date
    d2 = Empty
    MsgBox "d1= " & IsNullDate(d1) & ",  d2=  " & IsNullDate(d2)
End Sub

' Running `CheckDate()` has the following output:
' d1= False, d2= True
Posted by: Guest on July-05-2020

Code answers related to "vba check if date = 00:00:00"

C# Answers by Framework

Browse Popular Code Answers by Language