Monday, May 29, 2017

List Views based on calculate column containing difference in days between two dates

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.

2 comments:

  1. Hi there! This post could not be written any better! Reading through this post reminds me of my old room mate! He always kept talking about this. I will forward this write-up to him. Fairly certain he will have a good read. Thank you for sharing!

    ReplyDelete
  2. It is perfect time to make some plans for the future and it is time to be happy. I have read this post and if I could I desire to suggest you some interesting things or advice. Maybe you can write next articles referring to this article. I want to read more things about it!

    ReplyDelete