hello all
I try to store DateTime to mysql ,
but when i open the table in mysql command line I see that
the hour is decrease 12 by it self ,
why this can happen ,?

my insert command is
insert = "Insert into Table1(DtIn)values('"+ hin.ToString("yyyy,MM,dd,HH,mm,ss")+"')";;

hope someone help
thank you

Did you display the string 'insert' before you did the insert to see what values it had?

yes.it display correcly ,it iis mysql which decrease the value by 12.
if I insert it with command:

insert = "Insert into Table1(DtIn)values('"+ hin +"')";;

then error message said that the value is incorrect if hour value is above 12
and it give no error if hour value is under 12
how to overcome this problem

thank you

How is your table defined? Are you using MySqlCommand or OleDB?

hi all
I have found the solution
I just wrote the command string wrong ly
After I fix it it save correctly

thank you all