dbTalk Databases Forums  

Reformatting the date in DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Reformatting the date in DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Steve
 
Posts: n/a

Default Reformatting the date in DTS - 04-12-2005 , 12:34 PM






Hello

My DTS transformation is fighting with me.

I am exporting a smalldatetime field from a SQL Server table to a text file.
The requirements of the text file is that only the date (not the time) is
put into the file. And the date must be in YYYYMMDD format. This seems
amazingly simple but
I can't get the transformation to work. I continue to get YYYY-MM-DD.
....grrrrr.

Can anyone help without mocking my ignorance? . Okay, you can mock it.



Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: Reformatting the date in DTS - 04-12-2005 , 01:22 PM






CONVERT(CHAR(8),<smalldatetimefield>,112)

"Steve" <pezguy (AT) mn (DOT) rr.com> wrote


Quote:
Hello

My DTS transformation is fighting with me.

I am exporting a smalldatetime field from a SQL Server table to a text file.
The requirements of the text file is that only the date (not the time) is
put into the file. And the date must be in YYYYMMDD format. This seems
amazingly simple but
I can't get the transformation to work. I continue to get YYYY-MM-DD.
...grrrrr.

Can anyone help without mocking my ignorance? . Okay, you can mock it.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.