How to convert yyyy-MM-dd format into dd/MM/yyyy using Dataflow

Abhijit Bhadra 91 Reputation points
2022-05-19T14:26:06.523+00:00

I have tried like as below but stated format not accepted
203753-image.png

I have below format as of now

{"ValidFrom":"2021-01-01 00:00:00","ValidTo":"2022-01-31 00:00:00"}
,{"ValidFrom":"2022-01-01 00:00:00","ValidTo":"2023-01-31 00:00:00"}

Required {"validFrom": "01/01/2021", "validTo": "31/01/2022"}

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,640 questions
0 comments No comments
{count} votes

Accepted answer
  1. KranthiPakala-MSFT 46,642 Reputation points Microsoft Employee Moderator
    2022-05-19T20:02:45.623+00:00

    Hello @Abhijit Bhadra ,

    Thanks for the question and using MS Q&A platform.

    You will have to use a combination of toString and toDate functions in your expression builder to first covert your source column string type into date type and then format as needed using toString as shown in below sample:

    **For example**: toString(toDate(DoB, 'dd-MM-yyyy'), 'dd/MM/yyyy')   
    

    The above sample expression will result the below format:

    203767-image.png

    **Another example**: toString(toDate('2021-01-01 00:00:00', 'dd-MM-yyyy'), 'dd/MM/yyyy')   
    

    The above sample expression will result the below format:

    203759-image.png

    Hope this will help. Please let us know if any further queries.

    ------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.