Click to See Complete Forum and Search --> : [RESOLVED] Convert data type


amrigo
12-07-2006, 10:31 AM
Hi

using asp connecting to ms sql server, I get this error when doing a select
:
"The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value".

SELECT SUM(acessos) AS sum, title AS title
FROM estatistics
WHERE (date >= '4/12/2006') AND (date <= '7/12/2006')
GROUP BY title
ORDER BY title

If i am not selecting the date field why asp brings me this message

Thank´s in advance

chazzy
12-07-2006, 11:48 AM
what happens if you use the convert function in sql server to convert the input to dates?

amrigo
12-08-2006, 08:38 AM
thank´s the convert function is what i need .

best regards