hi,
can u plz tell me how to insert date in to msaccess

i have
text1.text=date
what is the sql statement for inserting

insert into table_name (datecolumn) values ('"+text1.text+"')

this is showing error... plz check with this.. urgent...

hi!
just try with this command.

text.text=now()

hi.. thanq...
while retriving itz showing the prob...

text1.text=now()
update table_name where t_date='"+text1.text+"'

here itz showing data mismatch

thats because text1.text is a string and t_Date is probably something else (date/time?)

Hi,

u have to use this synatx in AccessSQl :

insert into table_name (datecolumn) values (#" & text1.text & "#)

or

insert into table_name (datecolumn) values (Cdate(" & text1.text & "))

Regards
Veena

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.