New PHP script - convert 12 hour time to 24 hour mySQL format

June 23, 2005 · Print This Article

In an effort to assist web developers with creating forms using a mySQL database, but needing AM and PM for time entries on the user-side, I am pleased to announce the availability of the PHP-TimeConversion script.

This script converts user entered 12-hour time to the 24-hour time used by mySQL. It automatically checks user-entries for AM or PM and modifies the time accordingly before inserting the data into your table. PHP-TimeConversion also reverses this check when pulling data from the database. It will modify the time from the table to display in standard AM or PM format, auto-populating select fields with the data stored in the table.

The form submits to itself, minimizing the number of files you must modify. It also includes default variables making installation quick and easy. With HTML coding included, you can quickly add your own layout and design and have this script on your site in no time.

Download now.

Comments

Comments are closed.