News:

Wondering if this will always be free?  See why free is better.

Main Menu

Date Format

Started by TheCase, October 03, 2008, 04:37:32 PM

Previous topic - Next topic

TheCase

Hi,

SMF does the date as numbers like 343829 whats the PHP code for converting this in date and time

Thanks

Nathaniel

If you are trying to convert the unix timestamp into date/time, with the same format as shown around your forum, then you can use SMF's 'timeformat()' function.

PHP itself, has a series of Date/Time Functions. So you can use the PHP 'date()' function to convert from a timestamp to the time/date format that you want (if you don't like the SMF one), and the 'strtotime()' function to convert from a date/time to a unix timestamp.
SMF Friend (Former Support Specialist) | SimplePortal Developer
My SMF Mods | SimplePortal

"Quis custodiet ipsos custodes?" - Who will Guard the Guards?

Please don't send me ANY support related PMs. I will just delete them.

Advertisement: