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 |
|
zeeshan13
Constraint Violating Yak Guru
347 Posts |
Posted - 2008-05-27 : 15:00:32
|
| Hi All,I have a table called Table1 with a field Date (varchar type). The records are like this;05/21/0807/02/0806/04/0806/10/08I want to convert the above into datetime (yyyy-mm-dd format)....in the above example my output should be;2008-05-212008-07-022008-06-042008-06-10How can i do this?Please help.Zee... |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2008-05-27 : 15:01:46
|
| You can use the CONVERT function with the appropriate style. But you should be doing this in your application rather than in T-SQL.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/Database maintenance routines:http://weblogs.sqlteam.com/tarad/archive/2004/07/02/1705.aspx |
 |
|
|
zeeshan13
Constraint Violating Yak Guru
347 Posts |
Posted - 2008-05-27 : 16:36:55
|
| OK. Thanks..... |
 |
|
|
|
|
|