Feb 21, 2019 09:06 AM
Has anyone else had this problem and if so how did you format it?
I have duration data in Airtable, specifically time we spent on a project that we will now bill our clients for. I am attempting to use zapier to send the information into QBO so we can bill faster. QBO requires the format to be hh:mm so that is what I set Airtable up to be, but when zapier pulls the data it is showing as an integer.
For example we worked 15 minutes, shown as 00:15 but in zapier it is shown as 900 (minutes*60). I tried to reformat it to hh:mm by using formatter by zapier and it returned 04:15 (four extra hours).
Not sure if this is an Airtable issue, a Zapier issue or a formatting issue. Any help would be greatly appreciated!
Feb 21, 2019 01:24 PM
I’d try either
If you go with Option 1, you can use this formula to convert durations into hh:mm-formatted text. (Obviously, replace {Duration}
with the name of your duration field.)
IF(
{Duration},
INT(
{Duration}/3600
)&
':'&
IF(
MOD(
{Duration}/60,
60
)<10,
'0'
)&
MOD(
{Duration}/60,
60
)
)
Feb 22, 2019 02:17 PM
I figured it out, thank you for the formula! It worked in Airtable but I then forgot to flip the data in Zapier! :woman_facepalming:
Jul 24, 2019 08:36 PM
So this formula works for me, the only catch is I need to extend it to seconds, not just HH:MM. How would I modify this formula to have accurate HH:MM:SS?
Jul 31, 2019 12:17 AM
I think this should do it — again, assuming {Duration}
is a value given in seconds:
IF(
{Duration},
INT(
{Duration}/3600
)&
':'&
IF(
MOD(
{Duration}/60,
60
)<10,
'0'
)&
INT(
MOD(
{Duration}/60,
60
)
)&
':'&
IF(
MOD(
{Duration},
60
)<10,
'0'
)&
MOD(
{Duration},
60
)
)