Help

Upcoming database upgrades. Airtable functionality will be reduced for ~15 minutes at 06:00 UTC on Feb. 4 / 10:00 pm PT on Feb. 3. Learn more here

Datetime_diff need formula to return value as Days, Hours, Minutes

Topic Labels: Formulas
Solved
Jump to Solution
1273 8
cancel
Showing results for 
Search instead for 
Did you mean: 

Hello Friends,

Needing to use datetime_diff to return days, hours, and minutes. I can only get the days to return the value. Tried all different types of formula nothing is working. Any thoughts?

SS 1.png

SS 2.png

1 Solution

Accepted Solutions

Well I figured it out!

IF({Date Sold/Ended}=0,BLANK(), DATETIME_DIFF({Date Sold/Ended},{Date Listed},‘d’)&’ d(s), ‘&MOD(DATETIME_DIFF({Date Sold/Ended},{Date Listed},‘hours’),24)&’ h(s), ‘&MOD(DATETIME_DIFF({Date Sold/Ended},{Date Listed},‘m’),60)&’ m(s)’)

See Solution in Thread

8 Replies 8

Try:
DATETIME_DIFF({date end},{date start},'days')&' days '&MOD(DATETIME_DIFF({date end},{date start},'hours'),24)&' hours '&MOD(DATETIME_DIFF({date end},{date start},'minutes'),60)&' minutes'

Hi Kamille, I can’t thank you enough! You’re brilliant! A thousand thank you’s! I hope one day I can be as smart as you are. :slightly_smiling_face: :slightly_smiling_face: :slightly_smiling_face: :winking_face:

It’s all practice. I just use Airtable a lot haha

I want to do something similar but only looking at the how many days lost.

@Elaine_Winter then all you need is the first part of the formula.

Thanks! I had been struggling a lot with that.

Hi Kamille - wondering if you could help me figure out how to use the formula you provided above but when the Date Sold/Ended and Date Listed fields are empty to not have it show the #Error. Many thanks in advance! :pray:

Well I figured it out!

IF({Date Sold/Ended}=0,BLANK(), DATETIME_DIFF({Date Sold/Ended},{Date Listed},‘d’)&’ d(s), ‘&MOD(DATETIME_DIFF({Date Sold/Ended},{Date Listed},‘hours’),24)&’ h(s), ‘&MOD(DATETIME_DIFF({Date Sold/Ended},{Date Listed},‘m’),60)&’ m(s)’)