Jump to content

formatting date from numbers


droidus

Recommended Posts

You need to turn on error_reporting and set it to E_ALL. The code you have will generate plenty of errors. If you got them, you should post them with your code for the future.

 

You have an integer and are trying to use it as an object. The proper syntax for this would be echo date('Y-m-d H:i:s', $date);

If you are trying to use a DateTime object, you need to create that object, rather than trying to use the int you have.

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.