I have a date column in database table saved as "2014-12-17 15:16:00".I have to import this date along with few other fields to a CSV file with format -"December 17,2014". Is there a way to Convert the date to this format easily in SSIS?
Through SQL , I can do it as below but it is not returning the full month name.
SELECT CONVERT(VARCHAR(20),GETDATE(),107)
Can we retrieve the full month name through SQL?
Also If we go with above approach , what is the appropriate Datetype to use in Flat File Connection manager for this date column to appear fine in CSV file?
Use the below approach to get full month name:
declare @d datetime ='2014-12-17 15:16:00'
select datename(month,@d)+' '+cast(datepart(dd,@d) as varchar(20))+','+cast(datepart(year,@d) as varchar(4))

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With