---
schema_version: "1"
id: 2209c76dc5f9416bbc7ab99eed4e3a940b0ce88057407d6332231f8a35d99f71
title: Project a Date Field
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-project.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-sql/guide/bi-sql-date-project.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: cf97f295f692928212b5dc720b7ec042e32730700c06d2ef2ecc0018479b87da
products:
  - SQL for Analytics Developer Guide
  - analytics
---

# Project a Date Field

To project a date field of type `DateTime`, use the `EXTRACT()` function on the date field in the `SELECT` statement.

```nolang
SELECT CloseDate
FROM "OpportunityFiscalEMTimezoned"
LIMIT 1;
```

| CloseDate           |
| ------------------- |
| 2014-12-30 16:00:00 |

This example projects only the year from the `DateTime` field.

```nolang
SELECT EXTRACT(Year FROM CloseDate) As CloseDate_Year
FROM "OpportunityFiscalEMTimezoned"
LIMIT 1;
```

| CloseDate_Year |
| -------------- |
| 2014           |
