JamesGMills
Programmer
Hello!
Now most of you will have seen when you are using a site that shows you dates of when things have happened if its happened today or yesterday then it will not show you the date it will actually say Today 15:35, or Yesterday 16:10...
Is this possible using SQL or is there something you can do on the date returned?
I am using datetime in mysql to store the date of something being added.
This is my SQL
SELECT *,date_format(DateAdded, '%D %b %Y %T') as DateAddedFormatted FROM $this->tablename
This will bring back something like: 22nd Jan 2008 16:15:27
Anyone got any advice/help on this one...
Thanks
------------------------
Now most of you will have seen when you are using a site that shows you dates of when things have happened if its happened today or yesterday then it will not show you the date it will actually say Today 15:35, or Yesterday 16:10...
Is this possible using SQL or is there something you can do on the date returned?
I am using datetime in mysql to store the date of something being added.
This is my SQL
SELECT *,date_format(DateAdded, '%D %b %Y %T') as DateAddedFormatted FROM $this->tablename
This will bring back something like: 22nd Jan 2008 16:15:27
Anyone got any advice/help on this one...
Thanks
------------------------