Jump to content
Macro Express Forums

Date/Time: possible bug?

Recommended Posts

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 dtValue1
Date/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 hours
Variable 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


Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...