Calculating difference in dates (duration) without seeing the word 'ago' in result

Hello,

I am calculating the duration of a trip:

  • Column 1 is a Date Column titled “Trip Start”
  • Column 2 is a Date Column titled “Trip End”
  • Column 3 is a Formula Field titled “Duration” where the Formula is Trip Start-Trip End

The formula result correctly outputs the duration in number of days, but the word “ago” is appended to the result, for example “3 days ago” even though the difference in dates is not “3 days ago” but “3 days”

Question: How do I either remove the word ‘ago’ from my result, or calculate the duration differently so that I see “X days” instead of “X days ago”?

Thank you!

1 Like

Hi @Lina_C, if you flip it to TripEnd - Tripstart then you will not see ago.

Ago is added when the duration is negative ( today - ( today + 3) ) = -3

Hope this makes sense.

3 Likes

Hi @mallika even with the correct formula I guess the word “ago” is far from ideal there.

Let’s say I have a elapsed time against a setpoint and check if I’ve done something quicker or slower than estimated:

Personally I’d expect a minus sign instead of the word “ago”.

Dear @Dalmo_Mendonca,

Hopeful this will bring you the expected result:

Thanks @Jean_Pierre_Traets. Yes, converting .ToNumber() does the trick somewhat.

I’ve built that table just to illustrate the ago issue, my real doc is a bit more complex with grouping and all so concat isn’t ideal.

I’m having the same issue where I would need to replace the word “ago” with a minus symbol. Instead of a difference between two dates, I’m calculating a difference between durations. @Jean_Pierre_Traets, would you mind giving me access to the doc so I can try and implement your solution? Thank you.

1 Like

Dear @Pepijn_Abucks

Welcome to the community :handshake:

Somehow I can’t relocate the previous sample and now I have reproduced at my best knowledge a new sample that should you help forward.

1 Like

@Jean_Pierre_Traets, thanks a lot for your help with this :slight_smile: I noticed that when converting duration to a number, it always converts “days” to units.
For example:
55 hrs and 12 minutes becomes “2.3”

Is there any way to change this so that it counts in hours?
So that the outcome would be something like 55.16

Thank you,
Pepijn

Dear @Pepijn_Abucks,

I assume that this post is what you are looking for:

Credits to @mallika

1 Like