days_in_month()
Given a timestamptz, returns how many days are in that month.
Required arguments
Name | Type | Description |
---|---|---|
date | TIMESTAMPTZ | Timestamp to use to calculate how many days in the month |
Sample usage
Calculate how many days in the month of January 1, 2022:
SELECT toolkit_experimental.days_in_month('2021-01-01 00:00:00+03'::timestamptz)
The output looks like this:
days_in_month
----------------------
31
当前内容版权归 TimescaleDB 或其关联方所有,如需对内容或内容相关联开源项目进行关注与资助,请访问 TimescaleDB .