terrypin Posted March 17, 2010 Report Share Posted March 17, 2010 I haven't used Date/Time variables much so maybe this has an obvious explanation. I'm trying to calculate the time in seconds between two events and getting a result I don't understand. Expressed as text the times are: tEndTime = 22:14:08 tStartTime = 22:14:01 which correctly shows that the macro took 7 seconds. Expressed as Date/Time variables those are: EndTime = 17/03/2010 22:14:08 StartTime = 17/03/2010 22:14:01 which again are correct. But after using the commands: Convert Date/Time to Decimal: %StartTime% => %dStartTime% Convert Date/Time to Decimal: %EndTime% => %dEndTime% I don't understand the result: dEndTime = 40254.9264879861 dStartTime = 40254.9264107639 What units are these? And why, after using these final commands Variable Modify Decimal: %dDuration% = %dEndTime% - %dStartTime% Variable Modify Decimal %dDurationRounded%: Copy Value (%dDuration%) Variable Modify Decimal: Round %dDuration% to 1 decimal places Text Box Display: do I get dDurationRounded = 7.72222192608751E-5 dDuration = 0 ? -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.