1

I have a SharePoint list item with a "start date" and a "end date" (both are always on the same year interval). I would like to have a column with the resulting year of these two dates. How should I go about doing this?

1 Answer 1

3

If both dates will always occur within the same year, then you only have to extract the year from one of the columns. The easiest way to do this should be to use a calculated column. Try this formula:

=IF([StartDate]="","",""&YEAR([StartDate]))

You'll need to choose "Date and Time" as your result type on the calculated column. This says that if the StartDate value isn't blank, return the year by itself with no placeholders for the month and day. If the StartDate value is empty, the calculated column just returns a blank value itself instead of a nasty #NULL or funky date like 1901.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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