Hi

Very troubled about this SQL code.. not sure what i'm doing wrong..
I have debugged so i know that the strArstall is the correct format.
Will be very happy if someone can give me a little hand here..
----- ERROR MSG -------
"The conversion of a char datatype to a datetime datatype resulted in an out-of-range datetime value"
----------------------------
--------- CODE ----------------
strSQL = "SELECT reg_date,fangenr,enavn,fnavn,fodselsnr " &_
"FROM BILDE WHERE accepted=0 and marked=0 and legal not in(1,2) and CONVERT(char(8),reg_date,4) = CONVERT(Char(8), CAST('" & strArstall & "' AS DATETIME),4) "
----------------------------------
Description :
-----------------------------------
1) Using a html form where i'm inserting ex : "28.12.03" in a field.
2) In the DB the field reg_date is "datetime".
3) Posting this to a asp page where i'm using the SQL selection as above.
4) Error msg in browser.