How to get month's number? | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

How to get month’s number?

Hi All! I neeed to get a month’s number with MDX. For examle if [Date].CurrentMember.Name = Mai, the number is 5. Thanks,
did u mean this SELECT "Month Number" = MONTH(’03/12/1998′)
GO Here is the result set: Month Number
the current month is MAY and if u execute the statement like follow : select month(getdate())
you would get the result as : — it will return the month number
5 hsGoswami
[email protected]
I think you are looking for this answer IIF ( time.CURRENTMEMBER.LEVEL.ORDINAL <> [Time].[Month].ORDINAL , NULL,
IIF([TIME].CURRENTMEMBER.NAME ="5",5,NULL)) Assume in time dimension, there are 3 levels Time——>
Month If you want to check for MAY then you have to build your dimension in such way that MAY month name should be displayed.