If you need to find difference in days between two dates suppose "Date 1" & "Date 2" then we use below formula -
=DateDif(Date 1, Date 2,"d") and set return type as Date and Time
But in case you want to set up list view based out of that calculate column we created above then SharePoint will not allow you to do that since return type in above case is Date & Time and it cannot be compared with numerics.
In order to do that, you need to use below formula -
=Date 1 - Date 2 and set return type as number
Now you can set up views based out of this column like if that column value is greater than 60 or less than 100 or any thing like that.
=DateDif(Date 1, Date 2,"d") and set return type as Date and Time
But in case you want to set up list view based out of that calculate column we created above then SharePoint will not allow you to do that since return type in above case is Date & Time and it cannot be compared with numerics.
In order to do that, you need to use below formula -
=Date 1 - Date 2 and set return type as number
Now you can set up views based out of this column like if that column value is greater than 60 or less than 100 or any thing like that.