Dateformat

  • Thread starter Christopher Brandsdal
  • Start date
C

Christopher Brandsdal

I'm turning green on this!!
What I need to do is insert a date from a textfield by using
rsFakt("DomeneDato") = Request.Form("DatoDomene")
I just get this error:


Provider error '80020005'

Type mismatch.

/Server_ny.asp, line 344



The database-field is set up with date/time. I use access.
I havd tryed this:

rsFakt("DomeneDato") = Now()

rsFakt("DomeneDato") = FormatDateTime(Now(), 0)

These ones should return the same???
The first one works, but the secound one returns the same error. WHY? How
can I format the string so that the database can take it?
 
D

Danny@Kendal

Christopher Brandsdal said:
I'm turning green on this!!
What I need to do is insert a date from a textfield by using
rsFakt("DomeneDato") = Request.Form("DatoDomene")
I just get this error:


Provider error '80020005'

Type mismatch.

You need to match the data types.

Does this work for you?
rsFakt("DomeneDato") = CDate(Request.Form("DatoDomene"))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,266
Messages
2,571,081
Members
48,772
Latest member
Backspace Studios

Latest Threads

Top