Search code examples
azure-data-factory

Azure Data Factory Copy Activity Copying Date Fields with trailin 0's


Whenever copying a table with ADF from Azure SQLDB where a field is Date type e.g. 16/06/2023 the copy activity will add the following additional 0's to the date e.g. 16/06/2023 00:00:00.

I think the copy activity is attempting to add a timestamp, although the Date type on SQLDB is just 'Date' type.

So, can someone take a look at copy activity and let me know how to prevent the 00:00:00 from being added to the Date field? enter image description here

The sink is as follows:

enter image description here

The desTable parameters are as follows:

enter image description here

And the connection is as follows:

enter image description here

From the above copy activity, I can't see why it's adding the timestamp or 00:00:00 to the end of the Date fields


Solution

  • To prevent the 00:00:00 from being added to the Date field, you can give the DateTime format as yyyy-MM-dd in the Mapping tab of copy activity.

    enter image description here

    Once you have given the dateTime format, you can run the pipeline again and it should not include the time component in the destination column.