Duration fields in Airtable

Prev Next

Plan Availability

All plan types

Permissions

  • Owner / Creator - Can add, delete, duplicate, rename, and customize fields

  • Editors - Sort, filter, group, hide, and copy field URL

  • Commenters / Read-only - Copy field URL

Platform(s)

Web/Browser, Mac app, and Windows app (with some additional limited support on mobile)

Adding duration fields in Airtable

To add duration fields:

  1. Open your Airtable home screen.

  2. Create or open your preferred base.

  3. Add or edit a field.

  4. Search for and select Duration.

  5. Click the icon under the “Duration Format” section and select your preferred format.

  6. Click Create field.

NOTE

  • When formatting the duration field's output, fractional values round up to the next closest value.

  • For example, suppose you select h:mm formatting but input 0.50. In that case, the duration output will round up to 0:01 since 0.50 represents half of a second.

Supported duration field formatting

  • h:mm: Hours and minutes, e.g. 1:23

  • h:mm:ss: Minutes and seconds, e.g. 3:45, or hours, minutes, and seconds, such as 1:23:40

  • h:mm:ss.s: Minutes, seconds, and deciseconds, e.g. 3:45.6, or hours, minutes, seconds, and deciseconds, such as 1:23:40.0

  • h:mm:ss.ss: Minutes, seconds, and centiseconds, e.g. 3:45.67, or hours, minutes, seconds, and centiseconds, such as 1:23:40.00

  • h:mm:ss.sss: Minutes, seconds, and milliseconds, e.g. 3:45.678, or hours, minutes, seconds, and milliseconds, such as 1:23:40.000

Formatting formula outputs as field durations

NOTE

  • You can also format numeric formulas, lookups, or rollup fields as durations.

  • For example, multiply a duration by a number or roll up the sum of a duration field from linked records.

To format formula outputs as field durations:

  1. Open your Airtable homepage.

  2. Create or open your preferred base.

  3. Add or edit a field.

  4. Search for and select Formula, Lookup, or Rollup.

  5. Build out a formula that results in a numeric value.

    1. If the formula results in anything other than a numeric value (string, array, date, etc.), then formatting the result as a duration will not be an available option.

  6. Click Formatting.

  7. Click the icons to select the Duration option and configure the Duration Format.

  8. Click Create field or Save.

It’s important to call out that duration fields store values in seconds, regardless of the format you select. To make up for this in your formula, divide by 60 to calculate in minutes, 3600 (60 * 60) for hours, etc.

Referencing a duration field in a formula field

Let’s say you want to utilize the amount of time entered in a duration field to dynamically add or subtract that time from a static value or datetime held in a date field. In these cases, you can reference the duration field in a formula field’s function. Here’s an example formula of adding a “Duration” field’s value to the “Start Date” value from the same record:

DATEADD({Start Date}, {Duration field}, "seconds")

Since duration fields store the duration value in seconds, you’ll want to consider this if you are adding any sort of static number to a duration in the formula. Let’s say you want to add 2 hours to every duration field value. In that case, you would need to convert 2 hours into seconds which would be 2×60×60 = 7200 seconds. So the formula to add 2 hours worth of time to every duration field value would be:

{Duration field} + 7200

You would then likely want to format the formula’s output as a duration and select your preferred duration formation as outlined in this section.

FAQs

Why is my duration field not showing as a valid option for the y-axis of my chart?

While duration fields are numeric, they are not valid options for the y-axis of a chart extension. You can use a formula field to re-process your duration into a plain number, then use that formula field as your y-axis. Here's an example formula to reformat your duration field in minutes {Duration field} / 60.