Last day of the week/month/quarter/year(周/月/季/年的最后一天)¶
Supported in: Batch, Faster
Returns the last day of the week/month/quarter/year.
Expression categories: Datetime
Declared arguments¶
- Date: Date to choose the last day of.
Expression\ - Unit: Date unit used to choose the last day of.
Enum\
Output type: Date
Examples¶
Example 1: Base case¶
Description: You can get the last day of the month from a date
Argument values:
- Date: 2022-02-01
- Unit:
months
Output: 2022-02-28
Example 2: Base case¶
Description: You can get the last day of the month from a timestamp
Argument values:
- Date: 2022-02-01T12:00:00Z
- Unit:
months
Output: 2022-02-28
Example 3: Base case¶
Description: You can get the last day of the week from a timestamp
Argument values:
- Date: 2022-02-01T12:00:00Z
- Unit:
quarters
Output: 2022-03-31
Example 4: Base case¶
Description: You can get the last day of the week from a timestamp
Argument values:
- Date: 2022-02-01T12:00:00Z
- Unit:
weeks
Output: 2022-02-06
Example 5: Base case¶
Description: You can get the last day of the year from a timestamp
Argument values:
- Date: 2022-02-01T12:00:00Z
- Unit:
years
Output: 2022-12-31
Example 6: Null case¶
Description: Null columns stay null
Argument values:
- Date: null
- Unit:
months
Output: null
中文翻译¶
周/月/季/年的最后一天¶
支持:Batch(批处理)、Faster(快速处理)
返回周/月/季/年的最后一天。
表达式类别: Datetime(日期时间)
声明的参数¶
- Date(日期): 需要获取最后一天的日期。
表达式\ - Unit(单位): 用于指定获取最后一天的时间单位。
枚举\
输出类型: Date
示例¶
示例 1:基础案例¶
描述: 可以从日期中获取该月的最后一天
参数值:
- Date: 2022-02-01
- Unit:
months
输出: 2022-02-28
示例 2:基础案例¶
描述: 可以从时间戳中获取该月的最后一天
参数值:
- Date: 2022-02-01T12:00:00Z
- Unit:
months
输出: 2022-02-28
示例 3:基础案例¶
描述: 可以从时间戳中获取该季度的最后一天
参数值:
- Date: 2022-02-01T12:00:00Z
- Unit:
quarters
输出: 2022-03-31
示例 4:基础案例¶
描述: 可以从时间戳中获取该周的最后一天
参数值:
- Date: 2022-02-01T12:00:00Z
- Unit:
weeks
输出: 2022-02-06
示例 5:基础案例¶
描述: 可以从时间戳中获取该年的最后一天
参数值:
- Date: 2022-02-01T12:00:00Z
- Unit:
years
输出: 2022-12-31
示例 6:空值案例¶
描述: 空列保持为空
参数值:
- Date: null
- Unit:
months
输出: null