[SOLVED] date time datatype selecting error (MSSQL)
Posted: Mon Oct 09, 2006 3:09 am
hello again i keep getting this problem:
[Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a char data type to a datetime data type
resulted in an out-of-range datetime value
in my mssql database. why this happens i do not know. i read up on the internet that
this may have something to do with the time/language settings. Unfortunatly these can't be changed because i'm not the only one that makes use of this DB and table
my query
The date in the table is in a datetime format with a length of 8 and it's a PK
The date in that is in the table is exactly like in the table: 1-8-2006
what i need for it to do is select everything between 1-8-2006 and 31-8-2006
i can't change the datetime format in the table because it's also being used for something else
and in the light of this the language also can't be changed
[Microsoft][ODBC SQL Server Driver][SQL Server]The conversion of a char data type to a datetime data type
resulted in an out-of-range datetime value
in my mssql database. why this happens i do not know. i read up on the internet that
this may have something to do with the time/language settings. Unfortunatly these can't be changed because i'm not the only one that makes use of this DB and table
my query
Code: Select all
SELECT naam, MAX(totaal) - MIN(totaal) AS complete, datum
FROM @@@@@_printer_stats
WHERE (datum >= '1-8-2006') AND (datum <= '31-8-2006')
GROUP BY naam, datumThe date in that is in the table is exactly like in the table: 1-8-2006
what i need for it to do is select everything between 1-8-2006 and 31-8-2006
i can't change the datetime format in the table because it's also being used for something else
and in the light of this the language also can't be changed