'ADF wrong datetime format pulled from SQL Server
I have trouble with converting datetime variable to correct format. When I query
select CONVERT(SMALLDATETIME, max(Date_U)) as Max_Date_U
FROM [MDM].[C_CARD_RAWDATA]
in SQL server I got: 2022-03-22 15:51:00
However, when ADF does it, I got 2022-03-22T15:51:00Z as variable.
How can I convert this strange datetime with T and Z to normal one without those letters?
Solution 1:[1]
Converting it directly do string solved the problem
select CONVERT(varchar,CONVERT(SMALLDATETIME, max(Date_U)), 120) as Max_Date_U
FROM [MDM].[C_CARD_RAWDATA]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | KacperG |
