Compare Date Fields and write sum in a third field
Issue #541
resolved
Hello Fidel,
Patrick Schuh says hi ;-) He is my colleague. We both love working with your toolbox in our Workflows. Great Add-on! Thank you very much!
I was wondering if the following is possible in a single transition (or possible at all):
I have two date fields: Startdate and Enddate. Is ist possible to compare the values and calculate the diffrence between the two dates so that it would result as a number of days? The result in days should be written to a third custom field.
Thank you for your help!
Cheers David
Comments (3)
-
repo owner -
Account Deactivated reporter Awesome! Thank you!
-
Account Deactivated reporter - changed status to resolved
- Log in to comment
Hi David,
I assume that the third custom field, i.e., the one you want to set, is a number field.
You should use "Mathematical and date-time expression calculator" with any of the following formulas:
1) The result may contain decimals:
2) The result will only show the integer part of the calculation:
3) The result will be rounded to the nearest integer:
where eeeee is field code for Enddate, and sssss is field code for Startdate.
Consider also the usage of a "Calculated Number Field" using any of the following formulas:
1) The result may contain decimals:
2) The result will only show the integer part of the calculation:
3) The result will be rounded to the nearest integer:
You should select duration as display format. This way you will get a pretty displaying of the duration. For example: 1 week, 2 days