Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

How do I create a date field using a text field that has year and month only.

I have a text field that contains year and month only (ex '201801'). How do i create a date field using this text field.   Thanks! Sallee
  • Greg_Deckler's avatar
    7 years ago

    Well, in DAX you could do this:

     

    Column = DATE(INT(LEFT([Column1],4)),INT(RIGHT([Column1],2)),1)