Written by Randall Clapp
Calculates the difference between two Date/Time up to 60 years back, down to milliseconds if set in approprate format. This macro prompts for number of days/years back etc. and checks against current date/time.
Download the macro file umdatetimedifferences.mex and save it to your hard drive where you store your macro file(s). Import the macros into your existing macro file by clicking File, Import, Import Macros.
Click on the icon in the Macro Explorer.
To write your own dates to input, format “yyyymmddhhmmsszzz” from text/ Date/Time input to string. It can be changed to input your own start and end date/ time in %T1% and %T2% instead of prompting for days back.
It works by calculating number of months to go back, then asking for date of last day of last month and adding it to date difference, looping through for date of end previous month etc. and adding, till it reaches month needed.
Macro Express 3
The PGM Function library is NOT needed, but can be selected to check after macro runs (only checks date calculation, not time! (Only use PGM Function library part if installed)
** Randall wins a Macro Express T-shirt for his submission.
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |