Board index » delphi » ado msacces econverterror invalid date when adding record

ado msacces econverterror invalid date when adding record

i have a msacces table  and "stk_date1" field :datetime(12.12.2002)
i want to add a record
addrecord.FieldByName('stk_date1').AsDateTime:=datetimepicker1.Date;

and i get an error  exception class Econverterror with message "04.06.2002
17:06:52" is not a valid date.
its very simple code , adding record into table with date field.
but i couldn't add. how can i solve this problem.
thanx.

 

Re:ado msacces econverterror invalid date when adding record


Quote
"ozgun bayrak" <oz...@gonetege.com> wrote:
>i have a msacces table  and "stk_date1" field :datetime(12.12.2002)
>i want to add a record
>addrecord.FieldByName('stk_date1').AsDateTime:=datetimepicker1.Date;

>and i get an error  exception class Econverterror with message "04.06.2002
>17:06:52" is not a valid date.
>its very simple code , adding record into table with date field.
>but i couldn't add. how can i solve this problem.
>thanx.

Access native format for date is american  

Other Threads