Thanks. I've found theMySql format but I can't seem to get it to display. I get no errors so I assume it's not massively wrong.
Code:
SELECT `user`.`username`, `user`.`usergroupid` , DATE_FORMAT(`user`.`lastactivity`, '%d/%m/%Y') as `date_string`
FROM `user`
WHERE (`user`.`usergroupid` ='7' OR `user`.`usergroupid` ='5')
ORDER BY `user`.`lastactivity` DESC
I want to try and keep it as MySQL code so I can add it to the queries.php and allow other admins to run the canned query.
--------------- Added [DATE]1349158474[/DATE] at [TIME]1349158474[/TIME] ---------------
OK, I got it working using the FROM_UNIXTIME function.
Code:
SELECT username, usergroupid , FROM_UNIXTIME(lastactivity) AS ladate
FROM user
WHERE (usergroupid ='7' OR usergroupid ='5')
ORDER BY ladate DESC