Jump to content


Photo

Date/Time Formula calculation


  • Please log in to reply
2 replies to this topic

#1 gfl

gfl

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts

Posted 12 March 2020 - 08:54 PM

How to calculate the time difference in minutes between 2 date/time fields?

 

For example,

 

- calculating the minutes taken on a task by subtracting the start date/time field from the end date/time field.

- calculating the time since the record was created



#2 X2Clifton

X2Clifton

    Advanced Member

  • Moderators
  • 49 posts

Posted 13 March 2020 - 08:37 AM

Hi gfl,

 

Just to make sure I'm understanding correctly, are you asking if there's a way within the app to calculate these time differences? Or are you wanting to know how to take their epoch times from the database and calculate the minutes between the two?



#3 gfl

gfl

    Advanced Member

  • Members
  • PipPipPip
  • 43 posts

Posted 13 March 2020 - 11:38 AM

Whatever works. 

 

I HAVE NOW FOUND A PARTIAL SOLUTION USING THE CUSTOM FORMULA FIELD TO CALCULATE TIME DIFFERENCES.

 

HOWEVER THE TIME DIFFERENCES THAT SHOW ON THE RECORD LISTS:

 

- DON'T SHOW ON GENERATED REPORTS

- DO SHOW ON THE SOME PRINTED REPORTS  BUT NOT ALL

- i HAVEN'T YET WORKED OUT HOW TO TOTAL TIMES FOR A TASK  TOTALING MULTIPLE RECORDS

 

THE CALCULATED TIME DOESN'T CHANGE WHEN THE START OR END TIMES ARE CHANGED, KEEPS THE RECORD CREATION TIME CALCULATION

 

 

I had mistakenly been using the {Attribute Label} formatting in the formula and not getting a result.

 

Now I'm using the 'Assigned To' feature to generate the field name and it works. The 'Assigned To' field name is different to the field name, prefixed by a 'c_'.

 

Now, subtracting a later date/time from an earlier date/time gives the number of seconds difference e.g. ={c_end}-(c_start}.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users