You are viewing limited content. For full access, please sign in.

Question

Question

time calculations field format incorrect

asked on April 2

I have a workflow that reads a document and pulls a variety of times. I need to calculate the difference between the times, so I used the Date Token Calculator.

The data is pulling properly (I don't need the seconds.)

Here is my calculation.

FYI, I did try adding the seconds to the time, but it made no difference, so i changed it back.

Here is the error when I run the workflow.

I have tried a variety of things, but have not been able to track the reason why this is happening or how to fix it. I went through several posts on Answers, but to no avail. Please help.

 

0 0

Answer

SELECTED ANSWER
replied on April 3 Show version history

Thank you for your suggestion.

I tried to convert as recommended, but I kept running into issues where the time overlapped from one day to another. I'm sure this would work, but would involve a few more calculations.

As I was playing with the process, I ended up deciding to change the Time from Custom to Specific. Between that and using multiple calculations in the Adjustments area, I was able to get it working.

If looks like this:

0 0

Replies

replied on April 2

That's because it's looking for a number value in minutes, not a time value. You'd probably need to do some math in your workflow to figure out the time difference between on scene and dispatch:

  • Convert the hour difference to minutes and add it to the difference between the on scene minute and the dispatch minute.

 

For your shown example, dispatch 21:57 and on scene 22:11:

  • 22 hrs - 21 hrs =  1 hr * 60 min/hr = 60 min
  • 11 mins - 57 mins = -46 mins
  • 60 min + -46 mins = 14 mins

 

Calculating it this way would give you a number you can use for your time token calculator, no matter how large the difference is.

1 0
SELECTED ANSWER
replied on April 3 Show version history

Thank you for your suggestion.

I tried to convert as recommended, but I kept running into issues where the time overlapped from one day to another. I'm sure this would work, but would involve a few more calculations.

As I was playing with the process, I ended up deciding to change the Time from Custom to Specific. Between that and using multiple calculations in the Adjustments area, I was able to get it working.

If looks like this:

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.