Airtable Duration field formatting (HH:mm) workaround

If you’re using a DATETIME_DIFF function in your Airtable formula field, there is a good chance that you will want to output the result in the HH:mm format.

In Airtable, you can do that by outputting DATETIME_DIFF in seconds, and then setting the Formatting to Duration.
Screenshot 2021-12-17 at 12.53.08

However, when you enable that field in Stacker, we will still show it in seconds—we do not support the duration formatting yet. What you can do in this case is create a new formula field that will convert the duration field into text.

Getting the duration field ready for Stacker

  1. In Airtable, make sure that your DATETIME_DIFF field is set to output the result in seconds.
    Screenshot 2021-12-17 at 13.02.02
  2. Create another formula field that will convert the seconds into HH:mm format.
  3. Paste this formula, but make sure you replace “First Duration Field Name” with our Field name: CONCATENATE(CONCATENATE(ROUNDDOWN({First Duration Field Name}/3600, 0),":"),CONCATENATE(INT((({First Duration Field Name}/3600)-(ROUNDDOWN({First Duration Field Name}/3600, 0)))*60),""),"")

You should now see the time difference in hours on that new formula field.

Getting the duration field in Stacker

  1. Manually sync your Schema and Data
  2. Go to App Settings > Fields
  3. Enable the new field
  4. In the layout where you want to show that field, click Edit layout
  5. Turn on the field

You should now have your duration field in Stacker.