Minty
AWF VIP
- Local time
- Today, 19:40
- Joined
- Jul 26, 2013
- Messages
- 10,646
I have two date fields I am comparing to determine if I create a new copy of a local table.
Date Value A is from a linked sql table type datetime , Date Value B is from the local table format date/time (imported from the same table as Value A!).
These are the actual values as access displays / stores them. If you look at them purely as dates ValueA <> ValueB should be correct but it isn't and fails.
I'm sure other people have fallen for this, the only way around it is to format the date values down to Format([ValueA],"yyyy/mm/dd hh:nn:ss") <> Format([ValueB],"yyyy/mm/dd hh:nn:ss") or round them both to the level of precision you require.
(I don't need the additional precision).
I'm assuming this happens when the imported table datetime is truncated locally.
Despite searching I couldn't actually find this anywhere.
Date Value A is from a linked sql table type datetime , Date Value B is from the local table format date/time (imported from the same table as Value A!).
Code:
Value A Value B
05/02/2015 13:22:52 05/02/2015 13:22:52
42040.5575489236 42040.5575462963
I'm sure other people have fallen for this, the only way around it is to format the date values down to Format([ValueA],"yyyy/mm/dd hh:nn:ss") <> Format([ValueB],"yyyy/mm/dd hh:nn:ss") or round them both to the level of precision you require.
(I don't need the additional precision).
I'm assuming this happens when the imported table datetime is truncated locally.
Despite searching I couldn't actually find this anywhere.