Duration fields are awesomely useful. However, if one wants to simply transfer the displayed duration (e.g. 1:45) to another field via a formula, Airtable passes along the stored value in seconds. Converting that back into a duration-like display is doable, but a little tricky, as I found out in this recent discussion:
I tried the TIMESTR() function, but that just gave an error, so I ended up writing my own seconds-to-duration formula.
My suggestion: expand the TIMESTR() functionโs capabilities to also convert durations into strings. I suppose a new function named something like DURSTR() might also work, but because durations are all about time, wrapping that conversion into TIMESTR() feels like it makes more sense.
This is a Broadcast Automation application where the problem domain is down to the second. Iโm doing time calculations where some of the duration fields represent the time (duration since midnight) and some are actual durations. Sometimes actual durations are negative.to schedules things before a certain time.
@Airtable_Clerk Duration fields support negative values, and you can use those in formulas do calculate offsets. Will that work for your use case? (My apologies if Iโm misunderstanding something. Iโm still not sure if your comment above was a request for assistance, or just a comment sharing how youโre using durations.)
I have a duration field that is using the DATETIME_DIFF() function. These are for calls so Iโd need to know the duration in hh:mm:ss. I know there is the built in formatting feature to change to a duration, but this duration field is being exported into a different program.
If I wanted to change the created hh:mm:ss duration into a string, how would I do that?
@Devan_Kreitzer The formulas above will only handle hours and minutes. Hereโs one that handles seconds (change all references to โTimeโ to point to your duration field):