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 into a field defined as
> INT(14). Use $eventdate = date("g:i a", $timestamp) to convert the
> timestamp into the desired English format.
>
> The mktime() function can also be used to convert from English time back
> into a timestamp.. but it has kind of a weird format. It takes six
> parameters and if you choose to use them they are all required.
Minor correction:
http://www.php.net/mktime
Arguments may be left out in order from right to left; any arguments
thus omitted will be set to the current value according to the local
date and time.
Torben
> $timestamp = mktime($hour, $min, $sec, $month, $day, $year);
>
> Hope this helps some.
>
> --
> Kevin Stone
> [EMAIL PROTECTED]
> www.helpelf.com
--
Torben Wilson <[EMAIL PROTECTED]>
http://www.thebuttlesschaps.com
http://www.hybrid17.com
http://www.inflatableeye.com
+1.604.709.0506
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php