Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Timestamps and recalling them

Status
Not open for further replies.

DeepBlerg

Technical User
Jan 13, 2001
224
AU
Hi,

In a mySQL database I have a field called date in a table set as type timestamp(14). A PHP page adds values to the db including a hidden date('Y-m-d H:i:s'); into the field in the db.

On another page I recall these values to display them and everything works fine except the date which is recalled like this: date("l, jS F, Y-h:i.sA",$row[1]) on each record is the same and is some weird value like January 19 1970.

Any ideas how I can fix this?

Thanks.
 
Try passing it through strtotime() first, to convert it to a Unix time stamp.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top