DATEDIF statement in SharePoint not working properly
-
29-09-2020 - |
Pregunta
I am trying to calculate the amount of days between two dates but my formula doesn't seem to be working properly. It's as is the function is ignoring the years in the dates. My function is as follows, formated as a Number
:
=IF([Today's date]>[Expiration Date],-DATEDIF([Expiration Date],[Today's date],"d"),(DATEDIF([Today's date],[Expiration Date],"d")))
I receive this error if I use the above function(Owners removed):
But then I replace -DATEDIF([Expiration Date],[Today's date],"d")
with -DATEDIF([Today's date],[Expiration Date]"d")
i get this result:
This is telling me that both cases are being treated as IF([Today's date]>[Expiration Date]
even though 3/24/2015 is clearly larger than 11/03/2014. Can somebody please tell me what I'm doing wrong? Thanks.
Solución
Try
=[ExpirationDate] - [TodaysDate]
Licenciado bajo: CC-BY-SA con atribución
No afiliado a sharepoint.stackexchange