I have searched the Net and come up empty-handed; I wonder if anyone here could assist me in resolving this issue.
I would like the data stored in a MySQL TIMESTAMP field to be called and displayed using PHP. I have already created the necessary MySQL columns in a table to record the date of creation and the date of modifiction, and a script to insert them into the table:
$query = "INSERT INTO articles VALUES
(See attached graphic for a screenshot of the corresponding table.)
This process works great; however, my problem arises when I retrieve the data from the database. The date is stored in this format:
2010-12-24 06:51:26, and when I pull the date into the webpage by merely assigning the data in that field a variable and calling the variable, it is displayed on the webpage exactly as it is stored in the database.
1) know how to change the timezone and / or format the date to a more user friendly format - between the time the date leaves the database and the time that it is printed on the page?
2) have a better way of storing dates than the MySQL method that I am using?
All help will be greatly appreciated.