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 |
|
palak
Yak Posting Veteran
55 Posts |
Posted - 2008-04-18 : 08:29:19
|
| how to convert date like :-9/2009 - to- 2009-01-09 00:00:00.000thanks. |
|
|
RyanRandall
Master Smack Fu Yak Hacker
1074 Posts |
Posted - 2008-04-18 : 08:50:03
|
One way...set dateformat dmyselect cast('1/'+'9/2009' as datetime)Ryan Randall Solutions are easy. Understanding the problem, now, that's the hard part. |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-04-18 : 08:53:10
|
quote: Originally posted by RyanRandall One way...set dateformat dmy mdyselect cast('1/'+'9/2009' as datetime) Ryan Randall Solutions are easy. Understanding the problem, now, that's the hard part.
MadhivananFailing to plan is Planning to fail |
 |
|
|
RyanRandall
Master Smack Fu Yak Hacker
1074 Posts |
Posted - 2008-04-18 : 08:55:26
|
quote: mdy
Oops - good point madhi. Ryan Randall Solutions are easy. Understanding the problem, now, that's the hard part. |
 |
|
|
palak
Yak Posting Veteran
55 Posts |
Posted - 2008-04-18 : 09:31:56
|
| thanks guys RyanRandall & madhivananthanks a lot!!! |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2008-04-18 : 10:07:28
|
quote: Originally posted by palak thanks guys RyanRandall & madhivananthanks a lot!!!
But always use proper DATETIME datatype to store datesMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|