Jump to content

Problems by inserting time AM and PM


coolex

Recommended Posts

Hello!

I try to insert times into my database.
I created a time field in a table and want to enter AM/PM time into it.
For example
"insert into test(time) values('10:00:00 PM');"
After that I want to view my table:
"select time_format(time, '%r') from test;"
I get this time (10:00:00) not as PM but always as AM. But I want it as PM in my DB.
How can I insert AM/PM time directly?

PLease help!
Thanks

Alex
Link to comment
https://forums.phpfreaks.com/topic/21935-problems-by-inserting-time-am-and-pm/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.