Issues with Converting Text to Date

In the Dataflow, I actually concatenated the MONTH('Date Column') and Year('Date Column') but when I am trying to convert that to date using either DATE() or STR_TO_DATE() functions, I am getting no values in the column. 

The deired output is like "Month name - Year" which should be of a date data type.

Any help is appreciated!

Comments

  • Ashleigh
    Ashleigh Florida 🟢

    Are you doing this in a dataflow or beast mode? If you want to do it in a dataflow you should be able to use the date operations tile to make two different column and then combine them. 

     

    Are you trying to get "Month name - Year" in the dataset or just to view on a card? Because you can format the date any way you want in the card settings so that it stays a date type column but still displays how you want. 

  • You can do this in a MySQL dataflow by using this:

     

    SELECT
    DATE_FORMAT(`Date_Field`, "%M - %Y") as `Month - Year`
    FROM your_table