Date conversion to Text

Options
Ankur5289
Ankur5289 Partner, Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS Core Concepts, Registered Posts: 27 Partner

i have some columns in date format and in Unix format . for example 2020-06-16T12:50:55.811Z

Now i need to convert these dates to text format like for the above example "20200616" as in YYYYMMDD format.

Is there any formulae to do that or any recipe?

Best Answer

  • 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,595 Neuron
    Answer ✓
    Options

    @Ankur5289
    ,

    Welcome to our community.

    If I was using a visual recipe I'd likely use Format date with a custom format. I'd then use the format yyyyMMdd to get the results you are looking for. (Note: Case does matter. upper case Y and lowercase y mean two different things. So do upper case D and lower case d mean two different things.)

    Here is some documentation on the Dataiku visual recipe feature.

    The key thing is to use the Java Simple Date Format to say what you would like to see in your column.

    I hope this helps a bit. And once again welcome to our community. Let us know how you get on with this.

Answers

Setup Info
    Tags
      Help me…