Question

pscorca on Fri, 22 Mar 2013 16:55:53


Hi,

I need to determine the month name as a calculated column into a Time table with a date field as the pk of the table.

I've used this formula: FORMAT(MONTH([Data]);"mmm")

but unsuccessfully.

Month names don't correspond with the month.

Any suggests, please?


Sponsored



Replies

Brent Greenwood on Fri, 22 Mar 2013 20:31:45


This one came up yesterday too. 

To use a date format (like "MMM" for month name), you need to pass the function a proper date.  Not just an int for the month part.

Try passing the full date (remove the MONTH() function).  And uppercase MMM is needed for month name abbreviated. 

=FORMAT([Date],"MMM")

Let me know if that helps.

pscorca on Sat, 23 Mar 2013 04:57:23


Ok, Brent, it functions. Many thanks.

I've read this blog: http://daxtips.wordpress.com/2012/01/18/get-month-name-from-a-date-field/

So I think it was wrong.

Bye