J
John Dann
I'm generating 2 datetime values inside a VB.Net program say datetime1
and datetime2.
datetime1 is retrieved from an Access database from a column of
datetime type.
datetime2 is generated internally by the program.
I want to test the condition:
If datetime1=datetime2 then CodeBlock
But CodeBlock never seems to get called even when I'm sure that
datetime1 and datetime2 are identical.
If I look at the identical datetime1/2 values I do see a difference in
formatting in the time part:
datetime1 (from Access) shows time as eg 11:59:59 PM
datetime1 (internally set) shows time as eg 23:59:59
Question is: Am I trying to test identity of the datetime values in
the wrong way or is the problem the difference in time formatting? If
the latter then is there some way I can set the database to return
datetime values using 24 hour clock times?
TIA
JGD
and datetime2.
datetime1 is retrieved from an Access database from a column of
datetime type.
datetime2 is generated internally by the program.
I want to test the condition:
If datetime1=datetime2 then CodeBlock
But CodeBlock never seems to get called even when I'm sure that
datetime1 and datetime2 are identical.
If I look at the identical datetime1/2 values I do see a difference in
formatting in the time part:
datetime1 (from Access) shows time as eg 11:59:59 PM
datetime1 (internally set) shows time as eg 23:59:59
Question is: Am I trying to test identity of the datetime values in
the wrong way or is the problem the difference in time formatting? If
the latter then is there some way I can set the database to return
datetime values using 24 hour clock times?
TIA
JGD