How to insert time 2009-09-22 18:09:37.881in mysql. Actually, I can insert and get time 2009-09-22 18:09:37in mysql, but whenever I try to insert 2009-09-22 18:09:37.881, the data is not inserted into the database.
2009-09-22 18:09:37.881 -------> YYYY-MM-DD HH:MI:Sec.Ms
I created a table using the following query
Create table XYZ(MyTime DateTime);
I tried the following query, which worked fine
insert into XYZ(MyTime) values('2009-09-22 18:09:37');
But I tried with the following query, which did not work fine (Data didnot get insert in the database)
insert into XYZ(MyTime) values('2009-09-22 18:11:38.881');
source
share