0

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

2
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by robin99
0

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

0

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.