Jump to content


This topic is now archived and is closed to further replies.


[SOLVED] Displaying time from a database?! *solved*

Recommended Posts

Hi - I have an SQL database with separate fields for time and date stored as time and date datatypes.

when I'm pullilng these values out of the database I want to format the date to: dd-mm-yyyy and I want the time to read without the seconds in 12 hour format: hh:ii am/pm.

I can get the current time displayed easily enough but I can't seem to be able to format a stored time:

        <?php $cream = $row_rsEventsByDate['ev_time'];
  echo $cream = date('g:i a');

**it's ok I did some extensive looking through all the stuff on the forum and found an article eventually thanks!**

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.