---
schema_version: "1"
id: 20dde293e217bc8785306a512e373a3fba184ec2312563340a4aad4804ed19e3
title: Access Parts of a Date
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/analytics/bi_dev_guide_sql/guides/bi-sql-date-access.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-sql/guide/bi-sql-date-access.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: 6c93d95e7e1b8891f32b1502faaf2f76d977602bdfa6fea8e1165a2d91449c91
products:
  - SQL for Analytics Developer Guide
  - analytics
---

# Access Parts of a Date

Use the `EXTRACT()` function to access parts of a date. You can use `EXTRACT()` in projections, filtering, grouping and ordering.

`EXTRACT()` follows this syntax.

```nolang
EXTRACT(DATE_PART FROM DATE_FIELD)
```

A date part can be one of the following values.

- `YEAR`
- `QUARTER`
- `MONTH`
- `WEEK`
- `DAY`
- `HOUR`
- `MINUTE`
- `SECOND`
- `EPOCH_DAY`
- `EPOCH`
- `FISCAL_YEAR`
- `FISCAL_QUARTER`
- `FISCAL_MONTH`
- `FISCAL_WEEK`

**note:** If you query a date field that doesn't contain time information, it will return 0.
