How does iDBQuery handle dates and timezones?

iDBQuery reads the date and timestamp types in your schema and writes the correct logic for periods like 'last quarter,' 'trailing 30 days,' or 'fiscal year to date.' When timezones matter it uses the timezone stored in your data and states the basis it used, so figures line up across sources.

iDBQuery reads the date and timestamp types in your schema and writes the correct date logic so you do not have to: - Relative periods like 'last quarter,' 'trailing 30 days,' 'month to date,' or 'fiscal year to date' are translated into the right date boundaries. - Grouping by day, week, month or quarter is handled in SQL against your real date columns. - Period comparisons align the calendars correctly, including partial periods, so you compare like with like.

When timezones matter, iDBQuery works from the timezone stored in your data, for instance timestamps kept in UTC, and will state the basis it used so figures reconcile across sources that may store time differently.

A worked example: ask 'orders per day last week in our business timezone' and iDBQuery writes the grouping and any conversion needed, then shows the SQL so you can confirm the day boundaries it used.

The differentiator is that fiddly, error-prone date arithmetic, fiscal calendars, week starts, timezone conversion and leap years, is written for you and made visible. Because iDBQuery shows the SQL and cites the rows, you can verify exactly which dates and timezone it applied, which matters when two systems disagree because one stores local time and the other UTC. If a period or timezone is ambiguous, it states its assumption rather than quietly picking one.

Updated 2026-06-22