Reputation: 54
I have a copy activity in Azure Data Factory that takes the output of a procedure and saves the data to CSV file. The procedure returns VARCHAR columns and the mapping is set from VARCHAR to String.
The issue I'm having is with the date format. The procedure returns the data as YYYY-MM-DD HH:MM:SS but the output file has a format for example Jul 16 2020 12:00AM. I can't seem to figure out why and how the format is changed. It should return the VARCHAR value and not transform the date format.
Please help.
Upvotes: 0
Views: 344
Reputation: 2254
If you change the output of a procedure like below, it might work.
use FORMAT function like below over datetime column:
Procedure Code:
ADF:
Upvotes: 1
Reputation: 1776
Not sure if yoyu have access to update the proc , if you have you can update this to something similar
Create proc spit_dateAsVarchar
as
select convert(varchar,getdate()) as 'DateVarchar'
TO
select convert(datetime,convert(varchar,getdate())) as 'DateAsDateTime'
Upvotes: 1