开发者

How to insert Time with AM/PM to MySQL database using PHP

I want to insert Time in MySQL database. In database I have two separate Fields for Date(date type) and Time(Time type). To insert a record I tried like below in my PHP. But Time only inserted(10:00:00). not AM/PM inserted. How to insert Time with AM/PM in PHP.

mysql_query("INSERT INTO Http(mobile, imei, time,date) VALUES ('1232456785', '123369584895544', TIME_FORMAT( '10:00:00', '%h:%i:%s %p' )开发者_JAVA百科,'2011/09/13')");


You can't do it. Here are formats for TIME type: http://dev.mysql.com/doc/refman/5.0/en/time.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜