How to convert dd-mon-yy to mm/dd/yyyy

I have a flat file source that is storing the date in dd-mon-yy format. When I try to convert to database type dbdate I get an error. Can anyone help me develop a solution using SSIS to convert this before I load into a table?
more ▼

asked Oct 08 '12 at 02:39 PM in Default

jhop2002 gravatar image

40 2 2 3

(comments are locked)
10|1200 characters needed characters left

1 answer: sort voted first
Configure your Flat File data source to use whatever regional setting is appropriate on the column and store it into a date-column in your database. Then you can retrieve the dates in whatever format you want (using for example SET dateformat).
more ▼

answered Oct 08 '12 at 04:19 PM

Magnus Ahlkvist gravatar image

Magnus Ahlkvist
15.9k 15 19 32

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.



asked: Oct 08 '12 at 02:39 PM

Seen: 1068 times

Last Updated: Oct 08 '12 at 04:19 PM