I am picking one dateTime from mysql database i want difference of these from now.
php function date_diff is suitable to making difference but i want output like following Actually i want to show last lime of login in system.
first date: 2013-12-07 12:26:10
Another date: Today
Output should be:
20 min
or
1 hour
or
2 hour
or
6 hour
or
Yesterday
or
2 days ago
i have no idea how to achieve this. any help would be appriciated.
Thanks in advance