Time input formatting in PHP-12 hour clock
| From: | David Shugarts | Date: | Fri, 13 Jun 2003 14:26:43 +0000 |
| Subject: | Time input formatting in PHP-12 hour clock | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-28598@lists.php.net to get a copy of this message | ||
Hi, All--
Has anyone already solved the problem of how to get a time input from the
user in people time (12-hour clock) and format it to be INSERTed in a mySQL
time field?
The mySQL time field is 24-hour and of course it can be formatted in the
SELECT statement to be displayed as 12-hour for the user. But--presumably in
PHP--I need the user to be able to input a time, then validate it as to
whether it is complete (e.g., expresses AM or PM and evaluates correctly),
then pass it into an INSERT statement into the time field of a database.
I suspect this already exists, just can't find an example.
TIA
Dave Shugarts