PHP- Converting to and from TIMESTAMPS
| From: | Ian Gray | Date: | Fri, 30 May 2003 11:17:23 +0000 |
| Subject: | PHP- Converting to and from TIMESTAMPS | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-149543@lists.php.net to get a copy of this message | ||
I am wanting one field on a table in one of my MYSQL databases to contain different dates and times
as a epoch timestamps.
Firstly how do I convert a particular time and date which the user will enter on the website into
the epoch timestamp.
And secondly, how do I convert it back once taken of the table. I'd like to use the date
function to print out this particular date and time- for example $a = date('g:IA l, jS F,
Y') so that $a could say '7:30PM Saturday, 23rd August, 2003' Does date only work by
outputting the current date or time? Can you get it to output the format of any date and time you
would like?
I'd be grateful for any help!
Ian Gray