- marked as minor
Calculation of 2 Dates formatted to minutes
Hi fcarmario,
I am trying to find the difference between 2 fields and then convert them into minutes. As of right now, my formula goes as follows: {End Time}-{Start Time}/{MINUTE}
I end up with this:
So then I would go and create an issue and pick out the dates 26-Feb 10:20AM (Start Time) and 26-Feb 10:40 (End Time) --> Which should return 20 minutes but instead I get a date returned instead of the difference in minutes:
Any ideas on why this isn't working??
Comments (4)
-
reporter -
repo owner Hi Devin,
There are two things to be corrected:
1.- Target field must be a "Number" instead of a "Date", since you are obtaining the number of minutes.
2.- You should use parentheses (brackets) to force subtraction to be evaluated before division, since "/" has greater operator precedence than "-". Use something like: ({End Time}-{Start Time})/{MINUTE}
Regards,
Fidel.
-
reporter Thanks Fidel! I will give this a try and update this page with my results.
In addition, would making the custom field a "Number", opposed to "Date", allow users to input a Date and Time (formatted as 26/Feb/14 10:40) and still make a calculation?
Best Regards,
Devin
-
reporter - changed status to resolved
It works! Thank you again, Fidel.
- Log in to comment