0

How do I make the timestamp string be displayed as something that is actually readable / understandable? Yes, I have looked on google, here and a couple other places, but I am not seeing anything too specific or I am just not understand. Thank you for your understanding, helping me out and not being too critical.

Here is what I have:

In the database:
timestamp int(11) unsigned

and it inserts it like this:
1252386167

Using Php to display Last Active it displays it like this:
1252410826

Thank you,

3
Contributors
3
Replies
4
Views
8 Years
Discussion Span
Last Post by Rkeast
1

Here is a customised function I use:

function EpochDate($timestamp, $format = "Y-m-d H:i:s")
{
	$final_timestamp = date($format, mktime(0 , 0, $timestamp, 1, 1, 1970));
	return($final_timestamp);
}

you would then call EpochDate("1252386167") You could call EpochDate("1252386167", "d m Y H:i") or whatever suits for a different date format

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.