endofweek()endofweek()
返回包含日期的一周的终点,根据偏移量移动(如提供)。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 ])
endofweek(
date [,
offset ])
参数Arguments
date
:输入日期。date
: The input date.offset
:输入日期中的可选偏移周数(整数,默认值为 0)。offset
: An optional number of offset weeks from the input date (integer, default - 0).
返回Returns
一个日期/时间,表示给定 date 值的那一周的结束(如果指定了偏移量,则还包含该信息)。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)
weekEndweekEnd |
---|
2016-12-31 23:59:59.99999992016-12-31 23:59:59.9999999 |
2017-01-07 23:59:59.99999992017-01-07 23:59:59.9999999 |
2017-01-14 23:59:59.99999992017-01-14 23:59:59.9999999 |