Good morning. I'm looking for a formula to calcul...
# general
a
Good morning. I'm looking for a formula to calculate the hour difference between two "Time of Day" fields. Any suggestions?
c
Are they the two distinct fields or one single field with an update time-of-day field? If it is two fields, this will probably work: Formula(Numeric): ROUND({ID of date field}-{ID of other date field})
In the second case, the difference between when a given field is updated, you may have to go digging down through the system notes (the log) of the record:
Copy code
MAX(CASE WHEN {systemnotes.field} LIKE 'Problem Order' AND {systemnotes.newvalue} = 'T' THEN {systemnotes.date} END) - MAX(CASE WHEN {systemnotes.field} LIKE 'Problem Order' AND {systemnotes.newvalue} = 'F' THEN {systemnotes.date} END)
I think that results in days so some more work on getting hours and minutes may be necessary, but that is the basic pattern.
a
thanks, Charles. I'll try this out