你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
endofweek()
Applies to: ✅ Microsoft Fabric ✅ Azure Data Explorer ✅ Azure Monitor ✅ Microsoft Sentinel
Returns the end of the week containing the date, shifted by an offset, if provided.
Last day of the week is considered to be a Saturday.
Syntax
endofweek(
date [, offset])
Learn more about syntax conventions.
Parameters
Name | Type | Required | Description |
---|---|---|---|
date | datetime |
✔️ | The date used to find the end of the week. |
offset | int |
The number of offset weeks from date. Default is 0. |
Returns
A datetime representing the end of the week for the given date value, with the offset, if specified.
Example
range offset from -1 to 1 step 1
| project weekEnd = endofweek(datetime(2017-01-01 10:10:17), offset)
Output
weekEnd |
---|
2016-12-31 23:59:59.9999999 |
2017-01-07 23:59:59.9999999 |
2017-01-14 23:59:59.9999999 |