Forum Discussion

Shrabanti's avatar
Shrabanti
New Contributor II
5 years ago

Time format Conversion not working

Hi All,
I am trying change a data format with expression.

Input is a string value: “9-JUN-21 10.06.39.000000 AM”
Output should be ‘yyyy-MM-dd HH:mm:ss’ format

I am trying data parse the incoming date format but unable find proper format for input date.
Date.parse($OrderDetailUpdateDate,“dd-MMM-yyyy’ 'HH:mm:ss.SSSXXX AM”).toLocaleDateTimeString({“format”:“yyyy-MM-dd HH:mm:ss”})

Could you please siggest.

2 Replies

  • skodali's avatar
    skodali
    New Contributor III

    @dimche.saveski
    Updated pipeline is resulting in different structure compared to the required format.

    • dimche_saveski's avatar
      dimche_saveski
      New Contributor III

      I’ve tried to achieve structure like your original post requirements, on the left is result on the right requirements:

      Maybe you like to achhieve Row1 : Column1 key value pairs?

      BR

      • skodali's avatar
        skodali
        New Contributor III

        @dimche.saveski

        Updated pipeline almost resulted the desired format but “values” should not be the target path. Values text should be part of JSON like:

        Pipeline results were like: