Jump to content

strtotime function help


fife

Recommended Posts

You don't need strtotime when the date/time is in that format, which is the number of seconds since 1970-01-01, just use the date function:

<?php
$date = 1306768978;
echo date('Y-m-d',$date) . "<br>\n"; // yyyy-mm-dd
echo date(l, F j, Y, $date) . "<br>\n"; // weekday, Month day, yyyy
?>

 

Ken

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.