---
schema_version: "1"
id: 675cf5bbe2717228db911a17670e20a74f0398c757cc1ea84b8883f13a8623d0
title: fiscal_week_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-week-last-day.md
canonical_url: https://developer.salesforce.com/docs/analytics/bi-dev-guide-sql/guide/bi-sql-date-fiscal-week-last-day.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: d14b9b33b663ba017cb6381f744f3a9a71baa24c6b336a257b8de14f876918a2
products:
  - SQL for Analytics Developer Guide
  - analytics
---

# fiscal_week_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 (Sunday) of the fiscal week that contains the specified date.

## Example

```nolang
SELECT OrderDate as "date", fiscal_week_last_day(OrderDate) as "fiscal_week_last_day" FROM "dates_sample_data";
```

| date                | fiscal_week_last_day |
| ------------------- | -------------------- |
| 2015-01-21 15:30:00 | 2015-01-25 00:00:00  |
| 2015-01-21 00:00:00 | 2015-01-25 00:00:00  |
| 2015-01-31 10:00:30 | 2015-02-01 00:00:00  |
| 2015-02-03 15:30:00 | 2015-02-08 00:00:00  |
| 2016-01-21 23:59:59 | 2016-01-24 00:00:00  |
| 2015-10-31 23:59:59 | 2015-11-01 00:00:00  |
| 2015-12-03 00:00:00 | 2015-12-06 00:00:00  |
| 2016-01-11 03:30:00 | 2016-01-17 00:00:00  |
| 2016-01-11 03:30:00 | 2016-01-17 00:00:00  |
