Jump to content

Help needed: how to display long date format in stats live page


Recommended Posts

Hi,

does anyone know how to display the full date and time in the stats live page / visitors online?

ps 1.3.6

currently the module has the following script in the table that shows the visitor:

 

<td style="width: 100px;">'.substr($visitor['date_add'], 11).'</td>

 

and the function is:

 

 

private function getVisitorsOnline()

{

return Db::getInstance()->ExecuteS('

SELECT c.id_guest, c.ip_address, c.date_add, c.http_referer, pt.name as page

FROM `'._DB_PREFIX_.'connections` c

LEFT JOIN `'._DB_PREFIX_.'connections_page` cp ON c.id_connections = cp.id_connections

LEFT JOIN `'._DB_PREFIX_.'page` p ON p.id_page = cp.id_page

LEFT JOIN `'._DB_PREFIX_.'page_type` pt ON p.id_page_type = pt.id_page_type

INNER JOIN `'._DB_PREFIX_.'guest` g ON c.id_guest = g.id_guest

WHERE (g.id_customer IS NULL OR g.id_customer = 0)

AND cp.`time_end` IS NULL

AND TIME_TO_SEC(TIMEDIFF(NOW(), cp.`time_start`)) < 800000

GROUP BY c.id_connections

ORDER BY c.date_add DESC');

}

 

How can i make the table display the long date & time in the table cell

<td style="width: 100px;">'.substr($visitor['date_add'], 11).'</td>

 

Any help appreciated...

Edited by marco989 (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...