Date conversion to Text

Solved!
Ankur5289
Level 3
Date conversion to Text

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?

0 Kudos
1 Solution
tgb417

@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.

--Tom

View solution in original post

0 Kudos
3 Replies
CoreyS
Dataiker Alumni

Hey @Ankur5289 welcome to the Dataiku Community. While you wait for a more detailed response, you should be able to achieve this with the Prepare Recipe. Here is some information in our documentation about Managing Dates.

I hope this helps!

Looking for more resources to help you use Dataiku effectively and upskill your knowledge? Check out these great resources: Dataiku Academy | Documentation | Knowledge Base

A reply answered your question? Mark as โ€˜Accepted Solutionโ€™ to help others like you!
0 Kudos
tgb417

@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.

--Tom
0 Kudos
Ankur5289
Level 3
Author

Thanks a lot @tgb417  and @CoreyS  this really helped. Now it has been converted to the desired date format.