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 |
|
sqlfresher2k7
Aged Yak Warrior
623 Posts |
Posted - 2011-12-06 : 11:00:40
|
| [code]datevalue -----------12/11/09 24:25:5512/08/09 14:25:5511/11/09 24:25:5510/08/09 11:25:55i want a query which should result the output datevalue -----------12/11/09 00:25:5512/08/09 14:25:5511/11/09 00:25:5510/08/09 11:25:55[/code] |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-06 : 11:06:03
|
| whats the datatype of datevalue field?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
sqlfresher2k7
Aged Yak Warrior
623 Posts |
Posted - 2011-12-06 : 11:15:37
|
| Datatype is varchar |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-12-06 : 11:54:45
|
then use replaceUPDATE tableSET datevalue = REPLACE(datevalue,' 24:',' 00:') ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2011-12-07 : 03:21:18
|
| This is why you should always use proper datetime datatype to store correct date valuesMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|