Link to home
Start Free TrialLog in
Avatar of parpaa
parpaa

asked on

Date conversion error is SSIS using Data Conversion Task

Hi Experts,

I have a package where i need to import the flat file (dailytally.csv) into a sql server table. I use data conversion tab between flat file and oledb destination. The import works fine except the datetime columns. Those columns are just taking the deault database timestamp instead of the actual timestamp in the file itself. I tried to change the data type from DT_DBDATE to DT_DBDATETIME and few others without any luck. Any suggestions appreciated. I have attached my package xml for your reference.
dailytally-ssis.txt
Avatar of Brendt Hess
Brendt Hess
Flag of United States of America image

I found the SSIS package attached, but not a sample of the data so I can see what values are actually in the datetime fields.

One suggestion - use the DT_DATE data type by preference.  This is much closer to SQL Server's internal structure.
Avatar of parpaa
parpaa

ASKER

Thanks for your response! Yes i did try DT_DATE before and it didnt work. Iwill try it again today. I have also attached my sample data.
DailyTally-sample.xlsx
ASKER CERTIFIED SOLUTION
Avatar of Brendt Hess
Brendt Hess
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of parpaa

ASKER

I have modified the file based on your requirements. The column in question are all the date column whihc are taking current db timestamp rather than actual value from the file. But you can look for 'Nom_date' column in particualr. LMK if you need  anything else.
DailyTally-sample.csv.xlsx