Returning Null Value for Date field

SHAWTY721

New member
Joined
Aug 28, 2008
Messages
1
Programming Experience
1-3
I have a module that is being called from different places in the application. I am trying to return a null date value if certain conditions are met. I was wondering is there a way to accomplish returning a blank date field. Here is my code:
VB.NET:
  If Not IsNothing(AlarmList) Then
            For Each Alarm In AlarmList
                Value = Module_KEPWare.fRead("M00339") 'Reads value from Jeremy's fRead Function
                If Value = 0 And Alarm(AlarmIndex).Acknowledge = True Then  'Alarm has been acknowledged but is gone
                    Alarm(AlarmIndex).Alarm = False
                    Alarm(AlarmIndex).Acknowledge = False
                    Alarm(AlarmIndex).DateTime = (myNow) '" / / "  'Return null value 
                ElseIf Value = 1 And Alarm(AlarmIndex).Alarm = False Then   'Alarm has just turned on
                    Alarm(AlarmIndex).Alarm = True
                    Alarm(AlarmIndex).DateTime = Now()
                End If
            Next
        End If

Any help would be greatly appreciated.

Thanks in advance!
 
Hello.

There is nothing like a blank/nothing Date. You can set a Date-Object to Nothing which isn't the smartest thing to do). If you want something which determines a blank date, I'd suggest that you use a simple date, f.e. 01.01.1901.

Bobby
 
Back
Top