SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have some documents that need to be deleted based on the following criteria: one year after termination, or three years after hire date, whichever is greater. I have created two calculated columns showing the purge dates based on the hire/term, but need to show the greater of the two for my filter. Can someone provide some guidance on how to create a calculated field to show the greater of the two values?

share|improve this question
up vote 0 down vote accepted

As a reference here is the msdn article on calculated field

The basic is that you convert the dates to integers, and then use the max function to get the largest value.

So something like: (Please note date/time string format depends on where you are so check it!)

=TEXT(MAX(INT([column1]),INT([column2])), "dd/MM/yyyy hh:mm:ss")
share|improve this answer
That worked. Thank you. – user12909 Nov 8 '12 at 20:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.