I have retrieved a date from a form and the
Request.form("D OB") gives me the format of: 12/04/1976.
When I try to use SQL to add the record to the database, I get the error below.
Microsoft OLE DB Provider for SQL Server error '80004005'
Arithmetic overflow error converting expression to data type datetime.
The code generating the error is below:
oRs.Open "MailList", oC, adOpenKeySet, adLockPessimist ic, adCmdTable
' Add a new record
oRs.AddNew
oRs("DOB")= DOB
' Update the record
oRs.Update
I need to know how to format the date variable so the database can be updated.
Thanks,
Dave
Request.form("D OB") gives me the format of: 12/04/1976.
When I try to use SQL to add the record to the database, I get the error below.
Microsoft OLE DB Provider for SQL Server error '80004005'
Arithmetic overflow error converting expression to data type datetime.
The code generating the error is below:
oRs.Open "MailList", oC, adOpenKeySet, adLockPessimist ic, adCmdTable
' Add a new record
oRs.AddNew
oRs("DOB")= DOB
' Update the record
oRs.Update
I need to know how to format the date variable so the database can be updated.
Thanks,
Dave
Comment