Convert Month and Year columns to a date type

marychetti11
marychetti11 Dataiku DSS Core Designer, Registered Posts: 1

I have 2 columns containing Months and Years. I am able to get Years to read as a date but I can't figure out how to get the Month to read as a month to combine into 1 column.

MonthYear
String

date

textdate
February2023
May2023
November2023

Answers

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,024 Neuron
    edited July 17

    Add a step a in prepare recipe and add a formula processor. Then use this formula:

    asDate(concat(Year, '-' , Month, '-01'), 'yyyy-MMM-dd')

    and you will get a full date data type.

Setup Info
    Tags
      Help me…