Problem solve Get help with specific problems with your technologies, process and projects.

Converting date format in flat files

I'm trying to copy a flat file into a table in SQL using DTS, but the flat file has been generated by an AS/400 system. As a result, the date is formatted like this:(yymmdd=051206). I'm working in VB.NET to get it formatted into the datetime SQL datatype format at the time of conversion. What's your advice on how to go about accomplishing this?
That format is actually fine the way it is; the preferred date format to use when working with SQL Server is the ISO format, YYMMDD or YYYYMMDD depending on whether you're using four-digit years. Your data is already in that format, so you're in luck. Import it into your datetime column as-is.
This was last published in January 2006

Dig Deeper on SQL Server Database Modeling and Design

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.