[PHP] Formatting a MYSQL time

2002-02-07 Thread Frank Miller
Hello, Since I'm the only one who uses php at work I run into a little problem and was hoping maybe someone could help me. I've set up a Mysql database that has an event time. I've set the field in the table as: eventtime time DEFAULT 00:00:00. When I go to print the

Re: [PHP] Formatting a MYSQL time

2002-02-07 Thread Miles Thompson
Here Frank, play with this you'll have to add a bit of code to select your time values, but it will start you down the road. I spent some time playing with this a couple of years ago, this is taken from a file with the grand name of junk.php! Miles Thompson // up here there's code to

Re: [PHP] Formatting a MYSQL time

2002-02-07 Thread Mark
I would let mysql do the work: select *,date_format(dateofevent,%H:%i %p) as date_formatted from table... - Mark On Thu, 07 Feb 2002 11:21:13 -0600, Frank Miller wrote: Hello, Since I'm the only one who uses php at work I run into a little problem and was hoping maybe someone could

RE: [PHP] Formatting a MYSQL time

2002-02-07 Thread Kevin Stone
= mktime($hour, $min, $sec, $month, $day, $year); Hope this helps some. -- Kevin Stone [EMAIL PROTECTED] www.helpelf.com -Original Message- From: Frank Miller [mailto:[EMAIL PROTECTED]] Sent: Thursday, February 07, 2002 10:21 AM To: [EMAIL PROTECTED] Subject: [PHP] Formatting a MYSQL time

Re: [PHP] Formatting a MYSQL time

2002-02-07 Thread Jim Lucas [php]
timestamp. then just through that into the date function and if should work. Jim Lucas www.bend.com - Original Message - From: Frank Miller [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 07, 2002 9:21 AM Subject: [PHP] Formatting a MYSQL time Hello, Since

RE: [PHP] Formatting a MYSQL time

2002-02-07 Thread Lars Torben Wilson
On Thu, 2002-02-07 at 10:47, Kevin Stone wrote: Unless the $eventdate coming being pulled from your database a bonified Unix timestamp the date() function will not work. I don't like MySQL functions so I've always used $timestamp = mktime() to create the timestamp. Then plug that value

RE: [PHP] Formatting a MYSQL time

2002-02-07 Thread Kevin Stone
Ah.. much appreciated. :) -Original Message- From: Lars Torben Wilson [mailto:[EMAIL PROTECTED]] On Behalf Of Lars Torben Wilson Sent: Thursday, February 07, 2002 12:43 PM To: Kevin Stone Cc: [EMAIL PROTECTED] Subject: RE: [PHP] Formatting a MYSQL time On Thu, 2002-02-07 at 10