Thanks! Great addition
Anyway I can use that same formatting to get this query to pull the last 24 hours correctly? This is currently not working right, the timestamp is a table I added to the attachmentviews.
Code:
//Total Downloads Today
$total_today = $DB_site->query_first('
SELECT COUNT(*) AS count
FROM ' . TABLE_PREFIX . 'attachmentviews
WHERE timestamp >= "' . strtotime("-1day") . '"
');
$total_today = number_format($total_today['count']);
//Total Downloads today