Forum Discussion
Sharepoint calculated column if date greater than another column
- Nov 06, 2018
Hey Matt Weston,
I thought it was working but it's not! Just noticed, the validation is not working properly.
The formula that works is this one =[To Date]>=[From Date].
Hi Rafael Benicio if you're looking at doing something with a calculated column then you could use a formula like this:
IF([End Date]>[Start Date],"Date Greater Than","Date Less Than")
You could apply column formatting to this column to then show a visible difference between the TRUE and FALSE values.
If you're looking to do column level validation, then unfortunately you can't compare two columns.
- Rafael BenicioNov 06, 2018Brass Contributor
Hi Matt Weston,
Thank you for your reply. Unfortunately, The formula below didn't work.
IF([To Date]>[From Date],"Date Greater Than","Date Less Than")
Here is the error message:
- Rafael BenicioNov 06, 2018Brass Contributor
Matt Weston Never mind, I put the formula in the validation settings under list settings and it worked.
Thank you so much! Cheers!
- Rafael BenicioNov 06, 2018Brass Contributor
Hey Matt Weston,
I thought it was working but it's not! Just noticed, the validation is not working properly.
The formula that works is this one =[To Date]>=[From Date].