Convert integer to date

Solved!
DE_BYTEL
Level 1
Convert integer to date

I want to extract the data for the last 6 months but I have a problem with the date format of my field.

 

On attachments you can see my column ANNEE_MONTHS and I want to convert this column to date format.

I try this but It can't works : 

 

SELECT *, DATE_FORMAT(annee_months, "%Y/%m") as date_format

 

 

I try to use a prepare recipe with a "Format date with custom format" but It can't works (the screen is on the attachments).

 

I don't know how to proceed.

0 Kudos
1 Solution
CatalinaS
Dataiker

To extract the date you should Parse to standard date format in the prepare recipe: 

Screenshot 2023-10-03 at 19.13.25.png

"Format date with custom format" can be used to convert the Date type to a string representation following a given format.

View solution in original post

0 Kudos
2 Replies
CatalinaS
Dataiker

To extract the date you should Parse to standard date format in the prepare recipe: 

Screenshot 2023-10-03 at 19.13.25.png

"Format date with custom format" can be used to convert the Date type to a string representation following a given format.

0 Kudos
DE_BYTEL
Level 1
Author

Hi, thank you for your answer. I try this method in the prepare recipe and it works ! 

0 Kudos