10

I am trying to get the month from a date field with the help of calculated column. However I get this syntax error whenever I want to submit the formula:

Error The formula contains a syntax error or is not supported.

the default language of our site is German and [datum, von] is a date field.

9 Answers 9

14

Below function gives you month in digit.

=TEXT([Date],"mm") => returns 01 if date is 15-Jan-2014 

Below function gives you month name

=TEXT([Date],"mmmm") => returns January if date is 15-Jan-2014 

Below function gives you short month name

=TEXT([Date],"mmm") => returns Jan if date is 15-Jan-2014 
1
  • :I have german month name in sharepoint list ,is there any way to convert month in Number? Commented Jul 27, 2020 at 12:38
9

Try to use this one =TEXT([DateField];"mmmm"). I usually have error if use ',' instead of ';' in formula. My site language is Russian and it then translates automatically if I write first in English.

Reference: Get the month name in calculated column

1
  • 1
    don't forget to mark this as answer ;) Commented Aug 7, 2013 at 10:55
4

It would help if you shared your formula. Try:

=TEXT([Date Column],"MMMM") 
2
  • sorry I forgot to write my formula. it is the formula: =TEXT([Datum, von],"MMMM") Commented Aug 6, 2013 at 21:05
  • maybe I should write it in another way for a site with German language. it seems that there are some small differences in the formula syntax in German: msdn.microsoft.com/de-de/library/bb862071(v=office.14).aspx Commented Aug 6, 2013 at 21:08
1

For sorting purposes (i.e. Ascending sort and Descending sort) on the month I usually do the following:

=CONCATENATE(TEXT([Some Date Column],"MM")," : ",TEXT([Some Date Column],"MMM")) 

This results in the format:

01 : Jan

Which then allows you to set up a View where you can correctly sort by Month.

1
1

This will return a number from 1-12 and a Null when the date column is blank.

=IF(ISBLANK([Some Date Colum]),"",TEXT([Some Date Colum],"mm")) 
1

The above link to the solution for getting rid of the "02", "02" values is broken ... however, I have posted a solution for that on my blog which will work just as well: http://thesharepointhive.blogspot.com/2015/12/render-sharepoint-list-headers-in-order.html

0

Last date of the month (this works for leap year as well)

QDate = August 2015

=DATE(YEAR(QDate),MONTH(QDate)+1,DAY(QDate))

0

I selected a date of 3 February 2018 in a custom list date column (named "Date") and then created a calculated column with this formula:

=CONCATENATE(TEXT([Date],"DDD")," ",TEXT([Date],"DD")," ",TEXT([Date],"MMM")) 

The calculated column appears as: Sat 03 Feb

0

When I faced the same issue, I have changed the site locale into English, added the calculated column formulae, then reverted the site locale back to German.

I've used the below calculated column formulae to get "MMMM-YYYY" format along with the correct sorting order for Months (January, February, March … etc. )

=REPT(" ";13-MONTH(DateColumn))&TEXT(DateColumn;"mmmm")&"-"&YEAR(DateColumn) 

But later faced trouble when entries from different years are present. So, I've changed the format into "YYYY-MMMM" using the below formulae.

=YEAR(DateColumn)&"-"&REPT(" ";13-MONTH(DateColumn))&TEXT(DateColumn;"mmmm") 

enter image description here

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.