There is no 20th or 22nd month. You created YYYYDDMM strings, not YYYYMMDD
strings.
--
http://www.aspfaq.com/
(Reverse address to reply.)
"F@yy@Z" <fayyaz.ahmed@mvwebmaker.com> wrote in message
news:OaAC$7nbEHA.4092@TK2MSFTNGP11.phx.gbl...[color=blue]
> Here is sql and Table format
>
> INSERT INTO Semester (Semester_Name, Semester_Start, Semester_End,
> Course_id)VALUES ('test','20042007','20042207','asdsa')
>
>
> 3 Semester_ID numeric 9 0
> 0 Semester_Name nvarchar 30 0
> 0 Semester_Start datetime 8 0
> 0 Semester_End datetime 8 0
> 0 Course_id nvarchar 10 1
>
> Regards
>
>
>
>
> "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
> news:O3mocynbEHA.3752@TK2MSFTNGP12.phx.gbl...[color=green]
> > Can you show the actual statement that causes this error, and the[/color]
> structure[color=green]
> > of the table you are inserting into...
> >
> > --
> >
http://www.aspfaq.com/
> > (Reverse address to reply.)
> >
> >
> >
> >
> > "F@yy@Z" <fayyaz.ahmed@mvwebmaker.com> wrote in message
> > news:#M7OhwnbEHA.4032@TK2MSFTNGP11.phx.gbl...[color=darkred]
> > > Thanks for your reply
> > > I tried the method described on
http://www.aspfaq.com/show.asp?id=2023[/color]
> > link[color=darkred]
> > > It giving me error when I am using date as "20040724" but there is no[/color]
> > error[color=darkred]
> > > when using "2004-07-24".
> > >
> > > As I am using only SQL server it should work according to this article
> > > inserting date as "20040724" but its not.
> > >
> > > its giving following error
> > >
> > > "Microsoft OLE DB Provider for SQL Server (0x80040E07)
> > > The conversion of a char data type to a datetime data type resulted in[/color][/color]
> an[color=green][color=darkred]
> > > out-of-range datetime value."
> > >
> > >
> > > I tried
> > >
> > > "John" <n o b o d
y@spam.com> wrote in message
> > > news:LPbLc.190094$xB.9264239@phobos.telenet-ops.be...
> > > > Use different boxes for D, M and Y
> > > > see ex. on
http://www.tenerife-dolphins-whales.com/booking.asp
> > > >
> > > >
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]