how could I change the date format from this yyyy/mm/dd to this dd/mm/yyyy in a ADF dataflow?. And I needed the date without timestamp

Gustavo Antón 0 Reputation points
2023-05-18T16:34:18.2266667+00:00

I want to change a date that I have in this format 'yyyy/mm/dd' to this other format 'dd/mm/yyyy' and I don't want the date with timestamp.

Important: the date source will come as a string field and I want convert it to date field

This task will be in a dataflow in ADF

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

1 answer

Sort by: Most helpful
  1. QuantumCache 20,366 Reputation points Moderator
    2023-05-19T01:09:09.47+00:00

    Hello @Gustavo Antón,

    Did you try "Derived Column" transformation inside the DataFlow, using the toTimestamp expression function?

    User's image

    DATA FLOW:

    User's image

    Derived Column Expression:
    Input format: 2023-05-26T04:54:49Z

    Output Format: 26/05/2023 (No time)

    toString(toDate(toTimestamp(DataLakeModifiedDateTime, 'yyyy-MM-dd'T'HH:mm:ss'Z'')), 'dd/MM/yyyy')

    User's image

    Output CSV showing the updated Date format : 'dd/mm/yyyy'

    User's image

    Please let us know if you need further help in this matter and we are happy to help!
    If the response is helpful, please click "Accept Answer" and upvote it. So that we can close this thread.


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.