Working with the Duration field

The Duration field is a specialized field for tracking time in hours, minutes, seconds, or days, making it perfect for logging work, tasks, or event lengths.

This guide covers what a Duration field is and its common uses, how to add the field and enter data, the different duration formats (e.g., h:mm:ss, d h m s), and how to use Duration fields in formulas.

Learn more: Configure field types

Add a Duration field in Baserow

What is a Duration field?

A Duration field is designed to store a length of time, such as 2 hours and 30 minutes, 45 seconds, or 3 days.

Unlike a Number field, it understands time-based units, allowing you to format the display and perform time-based calculations. This is ideal for tracking task or project durations, call or meeting lengths, event or video lengths, or time logs.

The Duration field also supports negative values, which can be useful for time-based adjustments or countdowns.

How to add a Duration field

  1. In your table, click the plus sign + to add a new field.
  2. Select Duration from the field type dropdown menu.
  3. Name your field (e.g., “Task Length”).
  4. Click Create.

How to enter data

You can enter durations in a cell using several formats:

  • Smart entry: Type the time using abbreviations (e.g., 1h 30m, 3d 45s, 1:23:45).
  • In seconds: Enter a plain number (e.g., 90). The field will interpret this as seconds and then auto-format it based on your settings (e.g., 1:30).

To enter a negative duration, simply add a minus sign (-) before the value (e.g., -1h 30m).

Duration formats

You can customize how the duration is displayed from the field configuration menu. This is useful for standardizing your data’s appearance without changing the underlying value.

Format Example Description
h:mm 1:23 Hours and minutes
h:mm:ss 1:23:40 Hours, minutes, and seconds
h:mm:ss.s 1:23:40.0 …and deciseconds
h:mm:ss.ss 1:23:40.00 …and centiseconds
h:mm:ss.sss 1:23:40.000 …and milliseconds
d h 1d 2h Days and hours
d h:mm 1d 2:34 Days, hours, and minutes
d h:mm:ss 1d 2:34:56 Days, hours, minutes, and seconds
d h m 1d 2h 3m Days, hours, and minutes (abbreviated)
d h m s 1d 2h 3m 4s Days, hours, minutes, and seconds (abbreviated)

Using Duration fields in formulas

Duration fields work seamlessly with formulas for calculations.

  • Math Operations: You can use multiplication (*) and division (/) to scale durations (e.g., field('Task Length') * 3).
  • Date Calculations: You can find the time between two dates. A formula like today() - field('Start Date') will result in a duration, which you can then format as days.
  • Converting to a number: Use the tonumber() function to convert a duration into its total number of seconds. This is essential for more complex calculations, like calculating an hourly rate:
    • field('Project Fee') / (tonumber(field('Time Logged')) / 3600)

Frequently asked questions

What’s the difference between a Duration field and a Number field?

A Number field stores a plain number (e.g., “1.5”). A Duration field understands time units and stores “1 hour 30 minutes.” Use a Duration field when you need to log time and display it in a human-readable format (h:mm:ss) rather than as a decimal.

How do I sum a column of Duration fields?

To sum a total duration for linked records, you can use a Rollup field. In the rollup configuration, select your Duration field and use the sum function.

How do I enter negative durations?

Simply type a minus sign (-) before your entry, just as you would with a Number field (e.g., -1h 30m or -90).


Still need help? If you’re looking for something else, please feel free to make recommendations or ask us questions; we’re ready to assist you.