Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.