Data factory Copy Activity Date formatting issue

Pratim Das, Partha C 346 Reputation points
2023-12-21T06:41:54.4966667+00:00

Hi,

I'm facing problem with ADF copy activity date format change. Please help. Problem statement -

I have a excel formatted file without extension in blob with a date time field.

Flatfile_Content

I have a copy activity to fetch the content and put in a csv file with date format as 'yyyy-MM-dd' for the last column.

In source preview of copy activity I'm seeing the value as

Source preview data

My mapping configuration is as

Mapping

When I ran the pipeline it is throwing error

error

Could you please let me know where I'm going wrong? Is there any other way to do that?

Thanking you in advance for treating it as a priority.

Regards,

Partha

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

1 answer

Sort by: Most helpful
  1. HimanshuSinha-msft 19,486 Reputation points Microsoft Employee Moderator
    2023-12-21T21:14:51.2166667+00:00

    Hi @Pratim Das, Partha C

    Thanks for the ask and welcome to Microsoft Q&A.

    I think if you intend is to copy the file to csv, you can make a small change and it will work , I did tested that .

    User's image

    This is tevt which you will have to add to the text box
    yyyy-MM-dd HH:mm:ss.fffffff

    I was able to copy the records.

    User's image

    I am not sure what kind of datetime format your record is (it may be an issues later and is worth exploring )

    2022-05-10 08:44:43.2100000 generally the format is "yyyy-MM-dd HH:mm:ss.fff"

    Hope this helps.

    Thanks
    Himanshu


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.