terrypin Posted March 2, 2013 Report Share Posted March 2, 2013 IMO, subtracting 16 hours from a Date/Time of 02/03/2013 15:00:00 should give the result 01/03/2013 23:00:00. But I get 30/12/1899 01:00:00. Subtracting 14 hours gives the correct result. // Set a fixed Date/Time as dtValue1Date/Time: Set dtValue1 to "02/03/2013 15:00:00" // Set to 15:00 on 2nd March 2013.Variable Modify Date/Time: %dtValue2% = %dtValue1% - 14 Hours // Subtract 14 hours.Text Box Display: Result after subtracting 14 hoursVariable Modify Date/Time: %dtValue2% = %dtValue1% - 16 Hours // Subtract 16 hours.Text Box Display: Result after subtracting 16 hours A demo macro is attached. (Ignore its trivial typo.) --Terry, East Grinstead, UK DemoPossibleBug.mex Quote Link to comment Share on other sites More sharing options...
Cory Posted March 8, 2013 Report Share Posted March 8, 2013 Looks like a bug to me. The 1899 date suggests it's loosing the integer portion of the time. Or something like that. An interesting quirk on the beginning of time in Delphi which I wrote about on my webpage. This sounds reminiscent of something I've seen before. Something with a date/time bug, maybe back in the beta days. Quote Link to comment Share on other sites More sharing options...
terrypin Posted March 9, 2013 Author Report Share Posted March 9, 2013 Thanks Cory, I've reported it. --Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.