cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Cannot format date correctly to YYYY-MM-DD

NAl
Contributor

Hi there,

Iโ€™ve looked at other articles addressing this but non has helped me so far.

Im looking to format a date in the DD/MM/YYYY to YYYY-MM-DD.
The date will always be populated.

Iโ€™ve tried the following expressions but they wont process correctly

Date.parse($original[โ€˜Due Dateโ€™], โ€œyyyy MM ddโ€)

LocalDate.parse($original[โ€˜Due Dateโ€™],โ€œyyyy/MM/ddโ€)
If I use the above expression and if the date is 06/04/2021, the output date becomes 0006-04-18. Itโ€™s inexplicable.

12 REPLIES 12

How do I open the sample pipeline in Snaplogic? The file downloads to my desktop and cannot find the appropriate application to open it. Iโ€™m a newbie with SnapLogic so still trying to find my feet.

You should use import option from designer to import this sample pipeline directly to your Snaplogic.

SpiroTaleski
Valued Contributor

@NAl

Click on โ€œImport a Pipelineโ€ button, and then open/select the appropriate sample pipeline that you want to import.

image

Regards,
Spiro Taleski

Thank you Spiro, found it

NAl
Contributor

Okay so the Date/Time Extractor is not available in our packs which is fine.

Using the expression provided, the date still doesnโ€™t format properly.
The input date is 06/04/2021 but in the expression appears as 0021-06-04