Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with the time() function

Status
Not open for further replies.

blondends

Technical User
Apr 25, 2003
84
GB
Hi,

I have created a forum and have just added a time field in the database so that when i message is written the time is recorded and then can be displayed back next to the message title. This all works apart from the AM PM part. I have just tested it out, the time was 1:31:32 PM but the time displayed on the web page was 1:31:32 AM. I have used a simple {time field} = time() line of code when inserting it into the database. Now how can i sort this out ? I assume that the time function uses the 24 hour clock. I am really stuck. The database that is being used is MySQL with a field type of TIME (00:00:00) - which i would have assumed would just work.

Thanks in advance,

Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top