Time Diff




Time Diff


Author: Jerry Chae


Description

The Time Diff plugin is a simple single function plugin but is very useful in my business process automation that deal with date/time. It takes 2 date/time data as input and give the difference after comparing the 2 date/time.



(warning) Note: More date and datetime formats (European styles) are available now - see UPDATES at the bottom of this page.

Format

The Time Diff plugin can take the following 21 data/time data formats. You can mix and match.

  1. YYYYMMDD
  2. YYYY-MM-DD
  3. YYYY/MM/DD
  4. MMDDYYYY
  5. MM-DD-YYYY
  6. MM/DD/YYYY
  7. B D YYYY
  8. B D, YYYY
  9. D B YYYY

10. YYYYMMDD-HHMMSS.mmm

11. YYYY-MM-DD HH:MM:SS.mmm

12. YYYY/MM/DD HH:MM:SS.mmm

13. MMDDYYYY-HHMMSS.mmm

14. MM-DD-YYYY HH:MM:SS.mmm

15. MM/DD/YYYY HH:MM:SS.mmm

16. YYYYMMDD-HHMMSS

17. YYYY-MM-DD HH:MM:SS

18. YYYY/MM/DD HH:MM:SS

19. MMDDYYYY-HHMMSS

20. MM-DD-YYYY HH:MM:SS

21. MM/DD/YYYY HH:MM:SS




Need help?

Technical contact to tech@argos-labs.com


May you search all operations,



Input (Required)


  1. 2 date/time data in compliance with the format above
  2. Must select one output options.
    • In seconds
    • Timedalta string
    • Value of 1, 0, or -1


Output

Return Value

Output option selected for String, CSV, and File


Return Code

        0 for success

        1 for invalid input

        9 for other failures


Note about Timedelta String when the difference is negative/minus (-)


When you compare 2 date/time data like below

04/21/2021 23:59:59

04/23/2021 00:00:00

The Return Value will be

-2 days, 23:59:59

while the difference is actually 1 day and 1 second, this Return Value is correct. The Timedelta string will give you first the difference in days and then after comma (,) it gives the details in  hr:min:sec.

Therefore, in this case, you should read the string as minus 2 days plus 23 hours 59 minutes and 59 seconds.


How to set parameters







Latest Update 2021.11.15

New! The Time Diff plugin now supports date and datetime formats from Europe.

As shown below, the new formats are available in the pulldown menu in the Advanced options




All Plugins