Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

DateTime format changes post generating a CSV file from a SQL Table

$
0
0

Hello Everyone,

I need some help in generating a CSV file on top of a SQL Table were the output for the date column is

[ 2019-05-16 07:54:46.000 ].

But we are expecting the output to be like [ 2019-05-16 ].

The below one is the query that generates the output file.

------------------------------------------------------------------------------

Select Name, ID, MAX(Date) as Date

FROM dbo.Products

Group by Name, ID

Having MAX(Date)< Getdate() - 1

Order by MAX(Date)

-----------------------------------------------------------------------------


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>