dbTalk Databases Forums  

how can I define the output date format

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


Discuss how can I define the output date format in the microsoft.public.sqlserver.dts forum.



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

Default how can I define the output date format - 08-14-2004 , 04:05 PM






Hi All
We have a DTS package which exports query results to a
text file. The query is dynamic and can contain some or
all fields in the table. I define the source/destination
columns by looping through the system table and reading
the column name etc. The problem is the date fields are
coming across as YYYY-MM-DD HH:MM:SS and I need it to be
mm/dd/yyyy. How can I force the formatting.
Any help would be appreciated.
Thanks
Dave

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

Default Re: how can I define the output date format - 08-14-2004 , 04:52 PM






You could try CASTing

Look up CAST in BOL.

--
--

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.SQLDTS.com - The site for all your DTS needs.
www.konesans.com - Consultancy from the people who know


"dcd" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi All
We have a DTS package which exports query results to a
text file. The query is dynamic and can contain some or
all fields in the table. I define the source/destination
columns by looping through the system table and reading
the column name etc. The problem is the date fields are
coming across as YYYY-MM-DD HH:MM:SS and I need it to be
mm/dd/yyyy. How can I force the formatting.
Any help would be appreciated.
Thanks
Dave



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.