insert date format changing

  • Thread starter Thread starter Sensay
  • Start date Start date
S

Sensay

hi guys,
this has really took lots of time from me and i wasn't able to solve it
i have written in my VBA codes this query:
DoCmd.RunSQL "insert into exister
(nomber_produit,date_d_expiration,quantite_en_stock,barcode) values (" &
rs!nomber_produit & ", #" & rs!date_d_expiration & "#," & rs!quantite_achete
& ",'" & rs!barcode & "');"

the problem is in the date, and it's really weird behavior.
if the date inserted was : 22/03/2008 , it will be inserted as : 22/03/2008
but if the date was : 03/07/2008 then it will be inserted as : 07/03/2008
and it will be changed for an unknown reason !!!
how can i stop that ???
P.S.: my system date is : dd/MM/YYYY, how can i insert all data in that
format and access from changing the date format.

it will be great if u help me with this

thanks in advnace
Sensay
 

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

Back
Top