I'm trying to get an interval of dates from a visual basic aplication, from a database in sql server 7.0, I've been trying a lot of things on my Select but i get that
"the convertion of a char data type to a datetyme data type resulted in an out-of-range datetime value"
the code im using is this: (well one of the codes, ive tryed like 10 different ways)
in Visual Basic 6.0
datebegin=#01/09/2001# ** example
dateend= #20/09/2001#
adodc1.Recordsource= "Select convert(smallDateTime, Date) from Table where convert(DateTime, Date) > '" & Datebegin & "' and convert(DateTime, Date) < " & Dateend & "'"
i should get all the registers of sepember, but its not working
i hope someone can help me, its driving me crazy!!!
thank You
Eli
"the convertion of a char data type to a datetyme data type resulted in an out-of-range datetime value"
the code im using is this: (well one of the codes, ive tryed like 10 different ways)
in Visual Basic 6.0
datebegin=#01/09/2001# ** example
dateend= #20/09/2001#
adodc1.Recordsource= "Select convert(smallDateTime, Date) from Table where convert(DateTime, Date) > '" & Datebegin & "' and convert(DateTime, Date) < " & Dateend & "'"
i should get all the registers of sepember, but its not working
i hope someone can help me, its driving me crazy!!!
thank You
Eli