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 |
|
amurark
Yak Posting Veteran
55 Posts |
Posted - 2011-09-27 : 00:27:23
|
| Msg 242, Level 16, State 3, Line 1The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.Ankita |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-27 : 00:34:01
|
| that means what ever value you've passed for a datefield/variable/parameter cannot be converted to valid date value. Post the statement which threw this error for more help------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
amurark
Yak Posting Veteran
55 Posts |
Posted - 2011-09-27 : 02:00:12
|
| number commentsSR10 "*** 02/06/10 12:14:51(Sandeep Singh) ***hence resolving the ticket..*** 02/06/10 12:14:21(Sandeep Singh) ***time has been expired for the request...*** 02/06/10 08:10:42(Shiv Bhagwan) ***Please do the need full.*** 01/06/10 20:49:59(Shiv Bhagwan) ***.*** 01/06/10 20:46:11(Shiv Bhagwan) ***Kindly Do the nned full.*** 01/06/10 07:29:48(Abhishek .) ***team plz install the projector for conference room-103 - 12"SR100 "*** 10/06/10 11:08:39(Poras Kumar) ***As per user, projector is no more required,Hence, resolving the ticket as per user confirmation.*** 10/06/10 11:06:40(Poras Kumar) ***As per user, projector is no more required.Hence resolving the ticket as per user confirmation.*** 10/06/10 08:32:16(Shiv Bhagwan) ***Please arrange the projector at Masterpiece, 4th floor*** 10/06/10 08:14:04(Shiv Bhagwan) ***Please arrange the projector at Masterpiece, 4th floor*** 10/06/10 07:37:17(Abhishek .) ***Please arrange the projector at Masterpiece, 4th floorDate Timings Room No.8th June 9:30 to 11 am 401 9th June 9:30 to 11 am 40110th June 9:30 to 11 am 401please tell me i want only date and time from the above field02/06/10 12:14:5110/06/10 11:08:39Ankita |
 |
|
|
Eddie M
Starting Member
14 Posts |
Posted - 2011-09-27 : 07:23:30
|
quote: Msg 242, Level 16, State 3, Line 1The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
I'm not an expert, but I often see this message when a date literal is not in the format specified by SET DATEFORMAT.For example, if SET DATEFORMAT mdy is in force, then you can't write a date literal as, say, '25/12/2011'. You need to either specify it as '12/25/2011', or SET DATEFORMAT dmy.Hope this helps. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-27 : 07:36:41
|
| why using dateformat? best way is to avoid ambiguity and pass dates always in YYYYMMDD format------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|
|
|