Welcome Guest, Not a member yet? Register   Sign In
[SOLVED]convert last_activity in mySQL to human readable date
#1

[eluser]the_unforgiven[/eluser]
Hi all,

How can i get the "last_activity" column form the database to show as something like last logged date?

See image for what I mean in SQL

then i want to just convert that to a human readable date to show in my admin panel

has something like

ID Username Last Logged date
1 admin 20th Jan 2012 @ 17:30

or something along those lines

#2

[eluser]the_unforgiven[/eluser]
Anyone got an answer for this?
#3

[eluser]Clooner[/eluser]
Basic php date function
Code:
date("F j, Y, g:i a", $timefromdb);

or you could use FROM_UNIXTIME in your mysql statement.

php is easier though!
#4

[eluser]the_unforgiven[/eluser]
@Jeroen Schaftenaar It's ok solved it doing it another way, i'll change the title to solved.




Theme © iAndrew 2016 - Forum software by © MyBB