---
schema_version: "1"
id: ed401870e7a86a5ab58a5a922282d83e63e8743e8b7b41f6c654a82afbfb1a5c
title: Time Zone Date Functions
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_saql/guides/concept/bi-saql-functions-timezone.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: f5daa87868b899f2b2e6de657ee91f759e2d0c0ec026cc1307de57d127e175da
products:
  - Analytics SAQL Developer Guide
  - analytics
---

# Time Zone Date Functions

When you enable the time zone feature, you can use the fields of the `DateTime` and `DateOnly` type to access date information in the specified time zone. For example, if a user in New York runs a SAQL query, they see date information displayed in Eastern Standard time.

**note:** In SAQL, the `DateOnly` type displays the date with an empty timestamp, for example, “2014-12-31 00:00:00.” The inclusion of the timestamp is a limitation of the beta release.

- **[Use Time Zone-Enabled Dates in SAQL Projections](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-use.md)**


    You can project an exact date such as 2017-3-31 23:59:59 or part of a date such as year, month, or day.

- **[Access Date Functions with Time Zone Enabled](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-access.md)**


    Use these functions to get the day, week, year, and other parts of `DateTime` or `DateOnly` fields. The return values are numbers.

- **[Group By Date](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-group.md)**


    You can group the result of your SAQL query by `DateTime` and `DateOnly` fields.

- **[Order By Date](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-order.md)**


    You can order the result of your SAQL queries by `DateTime` or `DateOnly`.

- **[Filter By Date](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-filter.md)**


    You can filter results by `DateTime` and `DateOnly` fields. Filters can include exact dates, specific date ranges, or relative date ranges.

- **[Calculate the Time Between Two Dates](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-between.md)**


    Use `date_diff()` and `daysBetween()` to calculate the time between two dates.

- **[Convert Dates to and from Strings](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-strings.md)**


    You can convert dates to strings.

- **[Handle Null Dates](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-null-dates.md)**


    Use `is not null` to filter out null dates.

- **[Determine the Day in the Week, Month, Quarter, or Year](https://developer.salesforce.com/docs/analytics/bi-dev-guide-saql/guide/bi-saql-functions-timezone-day-in.md)**


    These functions return the day of the week, month, quarter, or year, the date of the last day of the week, month, quarter, or year, and the number of days in the quarter or year.
