RE: days of the week, time calculations
| From: | James Corbett | Date: | Sat, 08 Jul 2000 17:07:42 +0000 |
| Subject: | RE: days of the week, time calculations | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-979@lists.php.net to get a copy of this message | ||
>Greetings.
>
>I need to convert MySQL's timestamp into a format
>that I can use for calculating the number of seconds
>between two date/times. I also need to be able to
>determine what day of the week a given timestamp
>is.
>
>I've looked everywhere that I can think of to look -- can
>anyone point me in the right direction?
>
>Thanks in advance,
>
>Kenn Murrah
Use
UNIX_TIMESTAMP( timestamp_field )
in your sql statement to return the timestamp field as a unix timestamp. You
can then use PHP's date() function to format it.
Cheers,
JC