VBA Format now() to spell out month
-
Thursday, May 03, 2012 8:55 PM
I have this mdx statement in the SSAS UI calculated measure - StrToValue(VBA!Format(now(), 'yyyy')))
Right now it is just showing the current year. I need it to show the month, spelled out, plus the year. (ie "May 2012")
I can't figure out the format for spelling out the month.
All Replies
-
Thursday, May 03, 2012 9:09 PM
Try this:
StrToValue(VBA!Format(now(), 'MMMM yyyy')))
This might be of help to you:
http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx- Edited by David Laplante Thursday, May 03, 2012 9:11 PM added msdn link
-
Thursday, May 03, 2012 9:12 PMAlready did. it just gives me a VALUE error and says the syntax is wrong
-
Thursday, May 03, 2012 9:20 PM
Oh I think I see..
STRTOVALUE tries to convert the date string (May 2012) to a value... try removing that function and have only
VBA!Format(now(), 'MMMM yyyy'))- Marked As Answer by kayluhh Thursday, May 03, 2012 9:24 PM

