I need a calculated field formula to compare two dates from two fields - and display the one that is the latest date.
Try some of the following equations in the Calculated Column.
=TEXT(MAX(INT( FirstColumnName ),INT( SecondColumnName )), "dd-MM-yyyy hh:mm:ss")
TEXT command allows you to format what is returned. In this case we're setting the integer value returned from
MAX into a date/time format of
[Day Number]-[Month number]-[Full year] [Hours]:[Minutes]:[Seconds]. Like noon today being
Here's an example comparing the Created and Modified of a signup sheet:
If you're fine with the default formatting that SharePoint does you can also just check max and return a date/time value.
=MAX(INT( FirstColumnName ),INT( SecondColumnName ))
Here we got rid of the
TEXT and just use the systems default formatting. Days are marked off as an integer and the hours/minutes are a fraction of some sort. So we let SharePoint decide how to display it by telling it the number returned from
MAX is a date value.