Britt
(Britt Steinhardt)
May 20, 2024, 1:21pm
1
Hi
I am using the following formula that works great - but I would like to add in if the end date is blank use today’s date - can anybody help. Thanks in advance.
INT(YEARFRAC(FORMAT_DATE({Start Date}), FORMAT_DATE({End Date}))) & " Years " &
INT(MOD(YEARFRAC(FORMAT_DATE({Start Date}), FORMAT_DATE({End Date})), 1) * 12) & " Months "
Sjurd
(Sjurd Skutlaberg)
May 20, 2024, 2:13pm
2
Hi @Britt
Try to replace {End Date} with:
(IF({Delivered time}<>“”,{Delivered time},(TODAY())))
Final formula should look something like this:
INT(YEARFRAC(FORMAT_DATE({Order time}), FORMAT_DATE((IF({Delivered time}<>“”,{Delivered time},(TODAY())))))) & " Years " &
INT(MOD(YEARFRAC(FORMAT_DATE({Order time}), FORMAT_DATE((IF({Delivered time}<>“”,{Delivered time},(TODAY()))))), 1) * 12) & " Months "
This works for me, but I’m sure there are better ways to do it.
Britt
(Britt Steinhardt)
May 20, 2024, 2:44pm
3
Sjurd Skutlaberg:
INT(YEARFRAC(FORMAT_DATE({Order time}), FORMAT_DATE((IF({Delivered time}<>“”,{Delivered time},(TODAY())))))) & " Years " &
INT(MOD(YEARFRAC(FORMAT_DATE({Order time}), FORMAT_DATE((IF({Delivered time}<>“”,{Delivered time},(TODAY()))))), 1) * 12) & " Months "
That worked - thank you!!