Browsing articles tagged with "date time Archives - PHP Dev Tips"
Jun
10
2011

The PHP Time Ago Function

It’s often handy to refer to Gmail’s “00:00 (4 minutes ago)” example as an additional feature of usability for web users. ┬áBy creating an effective time-ago function using PHP, we can effectively format most MySQL dates, datetime, and timestamp entries into an easier to read and comprehend “Sometime ago” outputs. Besides, who really wants to have to read a date anymore?! Accepted MySQL Dates As MySQL is capable of storing dates and datetimes in a […]

Jun
2
2011

Better date time display using MySQL query

So, you’ve got your database entries entered, optimized, and in the MySQL friendly 0000-00-00 format- but database date formatting just isn’t doing it for you on output? Using a quick trick within a MySQL query, we can easily convert that boring date into something a little more friendly and readable. Adding the “DATE_FORMAT” parameter to your query allows you to specify the conversion, leaving nothing for you to do except use your php to output. […]