dbTalk Databases Forums  

data convertion in DTS

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


Discuss data convertion in DTS in the microsoft.public.sqlserver.dts forum.



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

Default data convertion in DTS - 08-18-2003 , 08:43 PM






Hi,

I have a text file in which one field is a date but in
file it is in '20030818' format and I am tring to import
that file to a table which has a column datetime.

is it possible to convert '20030818' to datetime during
DTS import?

if yes please let me know how ?

Thanks.


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

Default Re: data convertion in DTS - 08-19-2003 , 01:01 AM






SQL Server should implcitly convert that format to datetime look at this
example

CREATE TABLE IsItADate (colA datetime)
INSERT IsItADate(colA) VALUES('20030818')

select * from IsItADate

colA
------------------------------------------------------
2003-08-18 00:00:00.000

(1 row(s) affected)

--

----------------------------
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org



"Ram" <mail_info (AT) rediffmail (DOT) com> wrote

Quote:
Hi,

I have a text file in which one field is a date but in
file it is in '20030818' format and I am tring to import
that file to a table which has a column datetime.

is it possible to convert '20030818' to datetime during
DTS import?

if yes please let me know how ?

Thanks.




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.