Menu

How to store date with HH,MM, AM/PM to MySQL

Written by

Store AM PM time string into TIME or DATETIME datatype in MySQL and retrieve with AM PM while display?

Save time as a regular 24 hour HH:MM:SS in the MySql time or datetime type. Do the formatting when executing query. Refer TIME_FORMAT() to reformat it into AM/PM format:

[snippet id=”24″]

Article Tags:
Article Categories:
MySQL

Leave a Reply

Your email address will not be published. Required fields are marked *

Shares