Get Year of CreatedBy date in a calculated column
Asked Answered
L

3

5

I am trying to create a calculated column in SharePoint 2007. I want it to return the year of the CreatedBy column date and set the day to be 1 and the month to be January the data type returned by the formula is of type Date.

Any ideas how I can do this? =YEAR([Created]) does not seem to work as expected.

Thanks Nav

Lindahl answered 12/11, 2010 at 16:14 Comment(1)
Thanks Marek question edited to clarify that I want to return the year of the Created column and set the month to January and the Day to 01Lindahl
L
6

=DATE(YEAR([Created]),1,1)

alt text

Lariat answered 12/11, 2010 at 16:29 Comment(0)
J
5

You can simply use =CONCATENATE(YEAR([Created])), it represents the year as plain text

Jehanna answered 22/8, 2011 at 10:58 Comment(1)
This actually is no solution for the problem (getting a date of 1/1/yyyy) but I think most people just want to have the year in an extra column. Then you should use the formula in this answer. It still works in SharePoint 2013.Sallyanne
E
2

Another solutionn = TEXT (created,"yyyy')

Epistle answered 29/7, 2014 at 16:17 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.