Skip to main content

I have a date+time and a duration (days: hours: minutes). I want to add a day:hour:minute duration to the date+time and output a new date+time. Issues I've encountered:

1. I can only set a duration field to be day OR hours/minutes/seconds. 

2. When attempting to create a formula to add a "Day" duration field to a "Hour" duration field the output is incorrect. For example I have a Day Duration field with "1" and in the Hour duration field I have 00:05. I tried

DATEADD({Next Output Days},{Next Output HH:SS},'seconds')   Results in #ERROR!
SUM({Next Output Days}+{Next Output HH:SS})   Results in 301?

I'd be fine with a result of the total seconds of the day + hours/minutes to use for my final formula but I can't seem to combine the day duration field and the hour/minute duration field into anything useable. 

I just want to recreate the function of this form under "Add or subtract time from a date" 
https://www.calculator.net/time-calculator.html?today2=07%2F31%2F2024&today2hour=6&today2min=15&today2sec=0&today2unit=a&c2op=%2B&c2day=0&c2hour=10&c2min=52&c2sec=0&ctype=2&x=Calculate#addsubtractdate

I thought this would be more simple than it is. Any help would be appreciated.

Hmm, I think you're going to need to have one field for days and one field for hours/minutes/seconds I'm afraid

DATEADD(
DATEADD(
Date,
Days,
'days'
),
{Hours/Minutes/Seconds},
'seconds'
)

Link to base


Hmm, I think you're going to need to have one field for days and one field for hours/minutes/seconds I'm afraid

DATEADD(
DATEADD(
Date,
Days,
'days'
),
{Hours/Minutes/Seconds},
'seconds'
)

Link to base


Thank you! This is perfect. It worked exactly as I needed.


Reply