B
Brian8568
I'm having a problem with VB 2005. I'm trying to compare 2 dates as
follows:
If AddTo <= AddFrom Then
'Error Code
Else
'Happy Code
End If
AddFrom should be earlier than AddTo.
This works great unless the AddTo has a time in the 12:00 AM hour and
AddFrom has the same day as AddTo but a later time.
Example:
6/26/2006 12:00:01 AM 6/26/2006 11:45:00 PM - True
6/26/2006 12:00:01 AM 6/27/2006 11:45:00 PM - False
6/26/2006 1:00:00 AM 6/26/2006 11:45:00 PM - False
6/26/2006 1:00:00 AM 6/25/2006 11:45:00 PM - True
Is this a flaw in VB or in my logic?
follows:
If AddTo <= AddFrom Then
'Error Code
Else
'Happy Code
End If
AddFrom should be earlier than AddTo.
This works great unless the AddTo has a time in the 12:00 AM hour and
AddFrom has the same day as AddTo but a later time.
Example:
6/26/2006 12:00:01 AM 6/26/2006 11:45:00 PM - True
6/26/2006 12:00:01 AM 6/27/2006 11:45:00 PM - False
6/26/2006 1:00:00 AM 6/26/2006 11:45:00 PM - False
6/26/2006 1:00:00 AM 6/25/2006 11:45:00 PM - True
Is this a flaw in VB or in my logic?