Time Diff-3.429.853
Time Diff | |
|---|---|
Author: Jerry Chae
DescriptionThe 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.
Note: More date and datetime formats (European styles) are available now - see UPDATES at the bottom of this page.FormatThe Time Diff plugin can take the following 21 data/time data formats. You can mix and match.
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
|
Input (Required)
2 date/time data in compliance with the format above
Must select one output options.
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