List tickets created on the weekend

Example Reports

Requirement: create a report that lists all the titles of all tickets created on a weekend, using Eastern Standard Time.

This example uses the SQL WEEKDAY function.

Note the use of + INTERVAL 5 HOUR to adjust the time zone from UTC to EST.

SELECT tickets.subject
FROM tickets
WHERE WEEKDAY(tickets.date_created + INTERVAL 5 HOUR) IN (5,6)

Published: 22/05/2018

Last updated: 22/05/2018