Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 841 Bytes

File metadata and controls

44 lines (33 loc) · 841 Bytes
api_name excerpt topics keywords api hyperfunction products
days_in_month()
Calculates days in month given a timestamptz
hyperfunctions
hyperfunctions
Toolkit
normalization
license type toolkit version
community
function
true
experimental stable
1.6.0
1.16.0
type
one-step operation
cloud
mst
self_hosted

days_in_month()

Given a timestamptz, returns how many days are in that month.

Samples

Calculate how many days in the month of January 1, 2022:

SELECT days_in_month('2021-01-01 00:00:00+03'::timestamptz)

The output looks like this:

days_in_month
----------------------
31

Required arguments

Name Type Description
date TIMESTAMPTZ Timestamp to use to calculate how many days in the month