Welcome Guest, Not a member yet? Register   Sign In
Timestamp to DateTime
#1

[eluser]codelearn[/eluser]
Hi Guys,

I found a function to convert DateTime to Timestamp ($event_date is in datetime format):

Code:
list($date, $time) = explode(' ', $event_date);
            list($year, $month, $day) = explode('-', $date);
            list($hour, $minute, $second) = explode(':', $time);
            $timestamp = mktime($hour, $minute, $second, $month, $day, $year);

Any idea how I could reverse this function? Thank you.


Messages In This Thread
Timestamp to DateTime - by El Forum - 02-25-2009, 01:26 PM
Timestamp to DateTime - by El Forum - 02-25-2009, 01:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB