"how to convert mysql time" Code Answer


use time_format:

select time_format('14:30:00', '%h:%i %p'); /* 02:30 pm */

change your php to something like this:

$finalresult = mysql_query("select field1, field2, time_format(datefield, '%h:%i %p') as thetime from events where clubid in (" . implode(',', $clubids) . ") order by date asc, time(starttime) asc");

this involves getting rid of * and specifying each field you want.

By corsiKa on February 15 2022

Answers related to “how to convert mysql time”

Only authorized users can answer the Search term. Please sign in first, or register a free account.