>>You need to know what is the format the server is accepting and use it. >Normally, using yyyy/mm/dd will be accepted on any settings because there is >no ambiguity.
>Correction: its not ymd its dmy
>
>i checked it in sql query analyzer
>set dateformat DMY
>insert into thetable(datecolumn) values('2002/03/23')
>it gives an error.
so force the date like the server is requesting (I can say that your server is not configured with default options).
sql = "insert into thetable(datecolumn) values('" & format(date, "dd/mm/yyyy") & "')"
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com