Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
sanrajesh
Starting Member
3 Posts |
Posted - 2009-02-05 : 20:59:34
|
| Hi,I need to convert the date field which is in Varchar in to SmallDateTime.The varchar Date field is in the format "2009-01-29 00:00:00"Using SSIS I have to transfer the date field to another field which is Smalldatetime.I tried with CONVERT(SMALLDATETIME,CONVERT(VARCHAR, CURRENT_DATE,110),110) which transfer NULL values only.Can you pl. help me out?- Sanra |
|
|
harlingtonthewizard
Constraint Violating Yak Guru
352 Posts |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
Posted - 2009-02-05 : 23:39:45
|
| just simple u can write like thisdeclare @d varchar(32)set @d ='2009-01-29 00:00:00'select convert(smalldatetime ,@d) |
 |
|
|
|
|
|