PDA

View Full Version : date format to access database



numbenator
20 Sep 2005, 09:16 AM
Hi
Im having difficulties with the date field writing to an access database.

I am simply transfering one field from one table to another field in another table.
Both fields are defined as date/time

I am using INSERT

INSERT into tablename (fielddate) VALUES (fielddate)
this isnt working
if i remove '' in INSERT I get the belwo error :
Microsoft JET Database Engine error '80040e14'

Syntax error in INSERT INTO statement.

/webwork/StudentSpace/archiveM-action.asp, line 28

if I put ' arrnd the value field date, like so,
INSERT into tablename (fielddate) VALUES ('fielddate')

I get the below error.
Microsoft JET Database Engine error '80040e07'

Data type mismatch in criteria expression.

/webwork/StudentSpace/archiveM-action.asp, line 28

Any ideas.
cheers
Steve

DanInManchester
01 Jan 2006, 10:56 AM
In access you should enclose your data in hashes like so

INSERT INTO tbl_Sometable (myDate) VALUES (#12/25/2005#)