Jul 11, 2019 01:21 PM
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?
Solved! Go to Solution.
Jan 21, 2021 12:48 PM
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)’)
Jul 12, 2019 03:08 PM
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'
Jul 13, 2019 08:01 AM
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:
Jul 13, 2019 12:07 PM
It’s all practice. I just use Airtable a lot haha
Jul 28, 2019 06:53 PM
I want to do something similar but only looking at the how many days lost.
Jul 28, 2019 08:19 PM
@Elaine_Winter then all you need is the first part of the formula.
Jul 29, 2019 03:20 AM
Thanks! I had been struggling a lot with that.
Jan 21, 2021 11:22 AM
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:
Jan 21, 2021 12:48 PM
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)’)