all groups > sql server dts > january 2004 >
You're in the

sql server dts

group:

Text Files & Date Fields



Text Files & Date Fields Peter Newman
1/7/2004 2:33:25 AM
sql server dts: I have a DTS that is reading a txt file. Part of the txt
file is being imported into 1 table using a datapump
task. That part is fine

The second part of the file i read into global varibles
and use a EXECUTESQL Task to inset them to another table.
I wont go into the reasons for this. This part of the
file contains dates ( i.e 01/01/2004' as strings. I need
to import them to the table as smalldate values. What
is thew best way to do this.. 1, should i set the Global
Varable as a date ? or should i use a cast function in
Re: Text Files & Date Fields Allan Mitchell
1/7/2004 10:36:03 AM
I find this way works for me

Formatting Character Data into Datetime fields
(http://www.sqldts.com/default.aspx?249)

--

----------------------------

Allan Mitchell MCSE,MCDBA, (Microsoft SQL Server MVP)
www.allisonmitchell.com - Expert SQL Server Consultancy.
www.SQLDTS.com - The site for all your DTS needs.
I support PASS - the definitive, global community
for SQL Server professionals - http://www.sqlpass.org


[quoted text, click to view]

AddThis Social Bookmark Button