Skip to main content
Solved

Create duration from 3 integers

  • October 12, 2020
  • 2 replies
  • 11 views

I have a form where users can post their time-based results. To make sure data is valid I use 3 fields in the form representing hours, minutes and seconds.

So I end up with 3 integers in my table. How to I make a DURATION format (h:mm:ss) out of these fields?

Best answer by kuovonne

Welcome to the Airtable community!

You can use a formula field that calculates the total number of seconds, then set the formatting for the formula field to duration.

({hours} * 3600) + ({minutes} * 60) + {seconds}

2 replies

kuovonne
Forum|alt.badge.img+29
  • Brainy
  • 6009 replies
  • Answer
  • October 12, 2020

Welcome to the Airtable community!

You can use a formula field that calculates the total number of seconds, then set the formatting for the formula field to duration.

({hours} * 3600) + ({minutes} * 60) + {seconds}

  • Author
  • New Participant
  • 4 replies
  • October 12, 2020

Welcome to the Airtable community!

You can use a formula field that calculates the total number of seconds, then set the formatting for the formula field to duration.

({hours} * 3600) + ({minutes} * 60) + {seconds}

Thanks @kuovonne! I had it right myself but had the fields as strings, not integers and that didn’t work.