Forum Discussion

philliperamos's avatar
philliperamos
Contributor
6 years ago
Solved

Julian Date to YYYY-MM-DD

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!

  • Ok, so I figured it out. I used:

    Date.parse(“2014003”, “yyyyddd”).toLocaleDateString({format: “YYYY-MM-DD”})

4 Replies

  • Ok, so I figured it out. I used:

    Date.parse(“2014003”, “yyyyddd”).toLocaleDateString({format: “YYYY-MM-DD”})

  • 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