|
-
Aug 2nd, 2005, 03:02 PM
#1
Thread Starter
Lively Member
[Resolved] Formatting MySQL's DATETIME plus or minus a COOKIE value
Hello all.
I have a DATETIME field in a MySQL database, called date_entered, into which I am inserting Greenwich Mean times via PHP like so:
The dates in the database look something like this:
Code:
2005-08-02 00:01:01
When I retrieve the database column, the PHP code looks like this:
Code:
echo $row->date_entered;
I also have a COOKIE called $_COOKIE['time_zone'] which stores values such as: -5 (for Eastern Standard Time), +1 (for Madrid), +2 (for Athens), etc. (I set Greenwich to 0, btw.)
Now, how would I add the value of $_COOKIE['time_zone'] to the result of the database column, then format it into, say:
Aug 02, 2005
Many thanks to anyone who can help me with this.
Last edited by solitario; Aug 9th, 2005 at 09:16 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|