ODBC guide

List events for next week using dynamic dates


This query uses dynamic date functions to list events for the next week. <> represents today's date in datetime format, and <> adds 7 days. This allows for automated queries that always fetch the upcoming week's events without hardcoding dates.

Dynamic Placeholders: Supported functions include FUN_TO_DATE for dates and FUN_TO_DATETIME for timestamps.

SELECT * FROM Events
--FROM EventsAll --(Get from All Calendars)
WITH (CalendarId='primary',
--//e.g. append -05:00 for EST (New York Time Zone) to convert local time to UTC -OR- just appends "Z" for UTC time (2026-01-01T05:00:00Z which is same as 2026-01-01T00:00:00-05:00 ).
      StartTime='<<today,FUN_TO_DATETIME>>-05:00',   
      EndTime='<<today+7d,FUN_TO_DATETIME>>-05:00')