Click to See Complete Forum and Search --> : Datetime conversion error


jamesm6162
12-13-2007, 04:09 AM
I'm trying to Insert a date into my my table but when i execute the query it gives me the following error:

Msg 242, Level 16, State 3, Line 3
The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
The statement has been terminated.

I'm Using SQL Server 2005. The Date is 0000/00/00.

I've already set the dateformat to ymd

Is the above an invalid date (being all zeros)?

chazzy
12-13-2007, 06:37 AM
yes it is. Month needs to be between 1 and 12, day would be any valid date # for that timeframe (1-28/29/30/31)