String dates to datetime format

vho
vho Registered Posts: 9 ✭✭✭✭

Hello, is there a way to convert string dates to datetime format? For example Jan-18 to '01-2018'?

I know sql has TO_DATE( '10 Aug 2018', 'DD MON YYYY' )

But is there something similar available for dataiku?

Tagged:

Answers

  • Liev
    Liev Dataiker Alumni Posts: 176 ✭✭✭✭✭✭✭✭

    Hi @vho

    Yes, indeed. When you have your dataset on the flow, you can use a Prepare recipe. Inside of it, you'll be able to perform many transformations. One of them is the parsing of dates from string into a datetime.

    The system will suggest formats based on your sample data, but you can override, or add additional formats in case the column contains several.

    Hope this helps!

  • tgb417
    tgb417 Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 1,601 Neuron

    @vho

    You might want to look in the prepare recipe. In particular, at the date parse step.

    This short training video will give you an overview.

    https://academy.dataiku.com/visual-recipes-overview/479166

  • RAMAN
    RAMAN Dataiku DSS Core Designer, Registered Posts: 3 ✭✭✭

    my date input date column is in this format,

    date

    20220602

    20220503

    i need to convert this date column into following formate,

    date(it should be stored as string and date as unparsed)

    2022-06-02

    2022-05-03

    any help would be appreciated.

  • AmandaM
    AmandaM Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 9 Dataiker

    Hello @RAMAN
    -

    You can use the format date processor to change your date input column to a string column with the format of your choice (e.g. yyyy-MM-dd) as seen in the screenshot attached. Here is some additional documentation on Managing Dates.

Setup Info
    Tags
      Help me…