Reputation: 169
I am building an ETL solution in Azure Data Factory that calls a stored proc and populates a CSV
The date columns are defined as datetime2 in the source and is being mapped to datetime in the CSV:
When I open the CSV in Excel, the dates are displayed as 00:00.0
with the formula bar showing 09/04/2019 00:00:00
:
Risk_Inception_Date Risk_Expiry_Date
00:00.0 00:00.0
00:00.0 00:00.0
00:00.0 00:00.0
00:00.0 00:00.0
00:00.0 00:00.0
00:00.0 00:00.0
00:00.0 00:00.0
00:00.0 00:00.0
If I save the CSV in Excel and open it in Notepad++ the dates change to 00:00.0
This is causing me a massive headache and can't find a way around it.
Any ideas?
Thanks
Brian
EDIT1: As per Marc's suggestion, map all the datetime2 source fields to plain text in the ADF control flows?
Upvotes: 0
Views: 661
Reputation: 5074
You can convert the source Date to the required format under Mapping in Type Conversion Settings
.
You can add your custom date format for conversion in dateTimeFormat or dateTimeOffsetFormat for example, MM/dd/yyyy HH:mm:ss:fff
Output before conversion:
Output after adding type conversion in ADF mapping:
Upvotes: 1