Skip to main content

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?



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'


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:


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.


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.


@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:


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)’)