Datatime format in ADF v2

Nandan Hegde 31,436 Reputation points MVP
2020-06-24T10:56:53.633+00:00

Hello ,
I have a requirement wherein I need to convert the below datetime fomat:
2020-06-24T10:30:54.6451783Z
into 2020-06-24T10:30:54.64Z
meaning yyyy-MM-ddTHH:mm:ss with trailing z.
Is there any direct format other than me concatinating the vlaue with z at the end

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
10,161 questions
{count} votes

1 answer

Sort by: Most helpful
  1. HimanshuSinha-msft 19,386 Reputation points Microsoft Employee
    2020-06-24T23:11:31.483+00:00

    Hello @NandanHegde-7720 ,

    You mentioned that you want to convert 2020-06-24T10:30:54.6451783Z to yyyy-MM-ddTHH:mm:ss with trailing z , then it should be 2020-06-24T10:30:54Z and not 2020-06-24T10:30:54.64Z .

    If my understanding is right I used the below expression in ADF and it worked for me .

     @formatDateTime('2020-06-24T10:30:54.6451783Z', 'yyyy-MM-ddTHH:mm:ss')
    

    Please do let me know how it goes .

    Thanks & stay safe

    Himanshu

    Please do consider to click on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members

    0 comments No comments