Forum Discussion
DATEDIF
Which format is in F2 it doesn't matter, it's important you have date not text. You may check by =ISNUMBER(F2) in any empty cell. If TRUE when date.
In formula better to use DATE() instead of text to avoid regional settings issues.
=DATEDIF(F2,DATE(2020,9,1),"y")
Even better second date also have in cell.
SergeiBaklan I'd be grateful if you could help me: Im trying to get a difference in days between 2 dates, e.g. date 01/01/2019 and 01/01/2020 and am using the formula =datedif(d3,q3,"d"). For some reason, instead of giving me days the answer is a date which doesn't make sense. I'm not sure what I'm doing incorrectly. The columns d3 and q3 are formatted to standard 'date'.
- SergeiBaklanAug 10, 2020Diamond Contributor
In general formula shall work.
Format doesn't matter, actual values are important. Perhaps you may submit small file similar to above (not screenshot, excel file) to check what's wrong.
- MaCa87Aug 11, 2020Copper Contributorfixed it, thank you!
- HansVogelaarAug 10, 2020MVP
MaCa87 Format the cell with the DATEDIF formula as General.
- MaCa87Aug 11, 2020Copper Contributor
HansVogelaar thanks this fixed it, format was set to date!