Skip to content
Time Durations
Share
Explore

icon picker
Time Durations

Formulas: Days(), Hours(), Minutes(), Seconds(), and Duration()
Category: Duration
days.svg
Days()
Creates a time duration for days
Another way to say it...
Hey Coda, I want you to take this number I’m providing and convert it into a duration of days.
plus-1hour.svg
Hours()
Creates a time duration for hours
Or, as one might say...
Hey Coda, I want you to take this number I’m providing and convert it into a duration of hours.
empty-hourglass.svg
Minutes()
Creates a time duration for minutes
Another way to say it...
Hey Coda, I want you to take this number I’m providing and convert it into a duration of minutes.
future.svg
Seconds()
Creates a time duration for seconds
Or, as one might say...
Hey Coda, I want you to take this number I’m providing and convert it into a duration of seconds.
date-to.svg
Duration()
Creates a duration of time
Or, put otherwise...
Hey Coda, I want you to give me a duration from the provided number of days, hours, etc. that I provide.

Each formula—with exception of Duration()—has one parameter. Duration() combines all parameters of the other formulas:
property-time (1).svg
Days, Hours, Minutes, & Seconds
Days(Days)The number of days.Hours(Hours)The number of hours.Minutes(Minutes)The number of minutes.Seconds(Seconds)The number of seconds.
Duration (Days, Hours, Minutes, Seconds)Input the number of days, hours, minutes, and seconds.


Days, Hours, Minutes & Seconds

Time-based values can be especially difficult to perform mathematical operations with. These duration formulas help you quickly turn a single number into a day, hour, minute, or second value to use within mathematical formulas.
Add days to a date
45
days from today it will be
11/20/2023
Add hours to a moment in time
7
hours from now it will be
12:00 AM
Add minutes to a time value
Lets add
28
minutes to
​2:28 AM
12/31/1899 2:56 AM

Add seconds to a time value
In
132
seconds,
the time will be

Duration

Duration, rather than helping you perform mathematical operations with time-based values, helps you quickly create a unique duration value.
Each one of the parameters with Duration() is optional, and you can choose which parameter you are trying to access by typing the parameter followed by a : .
5 days
Duration(days: 5)
5 hrs
Duration(hours: 5)
5 mins
Duration(minutes: 5)
5 secs
Duration(seconds: 5)
Since each parameter is optional, you can use as few or as many as you like!


Practice: Use a duration formula to modify existing time values
Done
Find out when a persons work shift would end based on break time and shift length
Done


Ready to master coda yourself?




Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.