---
schema_version: "1"
id: c5861dd72802da4bf33f5a8b5521b8e333fda6c22b943de5341de051bb65a232
title: fiscal_quarter_last_day({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-fiscal-quarter-last-day.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-sql/guide/bi-sql-date-fiscal-quarter-last-day.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: c66f820b06440230fb928e973452544d3ca7918c39eb1faf06e8b9b64d4ce5ee
products:
  - SQL for Analytics Developer Guide
  - analytics
---

# fiscal_quarter_last_day({date})

Accepts a `DateTime`, `DateOnly`, or legacy Date object as input. Returns an object of the same type that corresponds to the last day of the fiscal quarter that contains the specified date.

## Example

```nolang
SELECT OrderDate as "date", fiscal_quarter_last_day(OrderDate) as "fiscal_quarter_last_day" FROM "dates_sample_data";
```

| date                | fiscal_quarter_last_day |
| ------------------- | ----------------------- |
| 2015-01-21 15:30:00 | 2015-01-31 00:00:00     |
| 2015-01-21 00:00:00 | 2015-01-31 00:00:00     |
| 2015-01-31 10:00:30 | 2015-01-31 00:00:00     |
| 2015-02-03 15:30:00 | 2015-04-30 00:00:00     |
| 2016-01-21 23:59:59 | 2016-01-31 00:00:00     |
| 2015-10-31 23:59:59 | 2015-10-31 00:00:00     |
| 2015-12-03 00:00:00 | 2015-01-31 00:00:00     |
| 2016-01-11 03:30:00 | 2016-01-31 00:00:00     |
| 2016-01-11 03:30:00 | 2016-01-31 00:00:00     |
