Forum Discussion

asebes's avatar
asebes
Frequent Visitor
5 years ago
Solved

Change MMM-YY Format to a Date Format

Seems like this should be easy but can't quite get it.  Have text in the following format that needs to be converted to a date format (last day of the month).  Thank you!

 

Current Format (MMM-YY)                     Desired Output

Dec-19                                                     12/31/19

Jan-20                                                      1/31/20

Feb-20                                                      2/28/20

  • asebes and to add to mahoneypat 's reponse, here is a DAX calculated column version:

     

    EOM Date = EOMONTH("1-"&'Table'[Date Text],0)
     

     

3 Replies

  • mahoneypat's avatar
    mahoneypat
    Microsoft Employee

    You can add a custom column in the query editor with this formula to get your desired result.

     

    = Date.EndOfMonth(Date.From([Current Format]))

     

    Pat

  • DataZoe's avatar
    DataZoe
    Microsoft Employee

    asebes and to add to mahoneypat 's reponse, here is a DAX calculated column version:

     

    EOM Date = EOMONTH("1-"&'Table'[Date Text],0)
     

     

  • ac-pbi's avatar
    ac-pbi
    Frequent Visitor

    I wanted to do this in Power Query instead of DAX and creating a Custom Column with this formula worked for me (credit to ChatGPT for the assist):

     

    =Date.FromText("01-"&[YourTextColumnHere])