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) copy
Zaloguj lub zarejestruj się, by złożyć komentarz.