Wednesday, March 7, 2012

Date format Conversion

First of all, I'm fairly new to SQL Server 2000, so please be patient and explicit.

I have a text file that I'm going to import using DTS on a scheduled interval. The text file has three different date fields that are all formatted as:

YYYYMMDD example: 20031004

I need to get this data formated as:

MM/DD/YYYY, example 10/04/2003

DTS does not do this. If I set the field type to DATETIME it gives errors and will not import the data.

HELP!

Thanks,
Troy D. YoungHi, Set up a dts transform data task.
the go to th etransformation tab and remove the transformations that

cover datetime fileds.
Make suer yoiu have highlighted both the source and destination fields.
Add a new transform of type date.
Modify the date time formates and hit preview.
thats should do it.

regards, brian|||Originally posted by contiguous1
Hi, Set up a dts transform data task.
the go to th etransformation tab and remove the transformations that

cover datetime fileds.
Make suer yoiu have highlighted both the source and destination fields.
Add a new transform of type date.
Modify the date time formates and hit preview.
thats should do it.

regards, brian

It took some time, but I figured it out. For some reason it only lets me do one datetime field at a time in a transformation. I had to create a transformation for each datetime field in the table.

Thanks,
Troy D. Young

No comments:

Post a Comment