I am trying to import a CSV file into SQL server using SSIS. There is a date column (formatted as date when file is opened in excel). Column is DT_DBDATE
in Flat file manager. I am trying to load this data into a SQL server date column. The data is formatted as 1/17/2016
. I can see in data viewer that the data stays in this format from flat file source to OLE DB Destination but when the data is finally loaded into SQL table the format is changed to 1/17/2016 12:00:00 am
. How do I get the data to stay as 1/17/2016
in my final destination of SQL server?
It depends on the destination column data type:
- If the column data type is
datetime
orsmalldatetime
then the time will be displayed. - If the column data type is
date
(SQL Server 2012+) then time will not be displayed
For more info you can refer to the following link:
So if you don’t need the time part you can change the destination column type to Date
, or you can just remove the time part when reading the values within an application or a report.

Tags: date, excel, sql-serversql