Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Insert AM/PM in datetime column? 1

Status
Not open for further replies.

minkisi

Programmer
Dec 10, 2003
11
0
0
US
I have a datetime column (0000-00-00 00:00:00) in my table. I update the column from form fields for month, day, year, hour and minute. I always set the seconds to 00. This is all in PHP.

Where and how can I indicate AM or PM values? Are they part of the datetime column? I know you can use '%p' in the SELECT for display but how do I insert them?. Do I have to use the 24 hour time format? I would prefer not to do that.

Thanks,
minkisi
 
Thanks r937!

I made the users enter 24 hour time in the form. Then when you select from the table it brings back the correct AM or PM.

minkisi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top