Solved

Date conversion error is SSIS  using Data Conversion Task

Posted on 2012-04-11
4
419 Views
Last Modified: 2012-04-23
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
0
Comment
Question by:parpaa
  • 2
  • 2
4 Comments
 
LVL 32

Expert Comment

by:bhess1
ID: 37835337
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.
0
 

Author Comment

by:parpaa
ID: 37838567
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
0
 
LVL 32

Accepted Solution

by:
bhess1 earned 500 total points
ID: 37839365
Can you send the sample as a CSV instead of an Excel spreadsheet - preferably, an actual edit of one of your CSV files with private data obfuscated?  This would make it easier to analyze, since an Excel file (for example) represents NULL values as the text string NULL, and frequently reformats the data from whatever is actually in the file.

Also, do you know which specific field in the CSV is causing it to fail?

Finally, if you simply try to use the import/export wizard in Management Studio to import the file directly into a new table, what suggested data types get used for the new table, and does the import fail?  If so, on what row (approximately).
0
 

Author Comment

by:parpaa
ID: 37840245
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
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi all, It is important and often overlooked to understand “Database properties”. Often we see questions about "log files" or "where is the database" and one of the easiest ways to get general information about your database is to use “Database p…
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question