Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

format Month doesn't work

Hello teams,

I use "Month(Now()) to get the current month and I get "11" for this month. But I want to convert number to character (Novemeber instead of 11)

I use  Current = FORMAT(MONTH(NOW()), "MMMM") But the result returns January, which is wrong.
How to I have a correct format?
Thank you
 
  • Anonymous 

    Give this a try

     

     

    Current = FORMAT(NOW(), "MMMM")

     

     

    The problem you are running into is the way DAX (and excel and SQL etc.) think of dates.  

    NOW() is really 43784 which is the numeric value of 11/15/2019.

    When you say MONTH(NOW()) you are getting 11 which DAX reads as the date 1/11/1900 so it formats "MMMM" as January.

     

    If this solves your issues please mark it as the solution. Kudos 👍 are nice too.

     

2 Replies

  • Anonymous 

    Give this a try

     

     

    Current = FORMAT(NOW(), "MMMM")

     

     

    The problem you are running into is the way DAX (and excel and SQL etc.) think of dates.  

    NOW() is really 43784 which is the numeric value of 11/15/2019.

    When you say MONTH(NOW()) you are getting 11 which DAX reads as the date 1/11/1900 so it formats "MMMM" as January.

     

    If this solves your issues please mark it as the solution. Kudos 👍 are nice too.