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

Julian Date to YYYY-MM-DD

philliperamos
Contributor

Hi everyone,

I have a date in Julian date format (2014003) and I need to convert it to YYYY-MM-DD (2014-01-03).

Is there a way I can do this in SnapLogic?

Thanks!

1 ACCEPTED SOLUTION

philliperamos
Contributor

Ok, so I figured it out. I used:

Date.parse(โ€œ2014003โ€, โ€œyyyydddโ€).toLocaleDateString({format: โ€œYYYY-MM-DDโ€})

View solution in original post

4 REPLIES 4

philliperamos
Contributor

Ok, so I figured it out. I used:

Date.parse(โ€œ2014003โ€, โ€œyyyydddโ€).toLocaleDateString({format: โ€œYYYY-MM-DDโ€})

marenas
New Contributor III

Hello,

I have a use case where the Julian date is attached to the file name e.g. sampleFile.216.txt. How would you suggest converting โ€˜216โ€™ into yyyy-mm-dd format?

Regards,
Marrah

@marenas - This topic already has a solution for the original question - please open a new thread for this

marenas
New Contributor III

@koryknick, thanks for the response. I will open another thread.