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 |
inbs
Aged Yak Warrior
860 Posts |
Posted - 2012-09-03 : 04:06:33
|
how to convert nvarchar to date time?i try to convert for example this valur in my table :02/09/2012 20:30:01but i get this error:The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value. |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2012-09-03 : 04:26:48
|
you must have invalid data in the column.use isdate() to verify KH[spoiler]Time is always against us[/spoiler] |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2012-09-03 : 10:16:24
|
quote: Originally posted by inbs how to convert nvarchar to date time?i try to convert for example this valur in my table :02/09/2012 20:30:01but i get this error:The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value.
Show us the code you usedMadhivananFailing to plan is Planning to fail |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-09-03 : 15:26:53
|
quote: Originally posted by inbs how to convert nvarchar to date time?i try to convert for example this valur in my table :02/09/2012 20:30:01but i get this error:The conversion of a nvarchar data type to a datetime data type resulted in an out-of-range value.
is all date values in same format? if possible pass all of them in consistent format and try if format can be unambiguos like yyyymmdd------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|