DAYOFMONTH

Returns the day of the month as an integer.

Returns the day of the month as an integer.

Behavior type

  • Immutable if thetarget date is a TIMESTAMP, DATE, or VARCHAR

  • Stable if the target date is aTIMESTAMPTZ

Syntax

DAYOFMONTH ( date )

Parameters

date

The date to process, one of the following data types:

Examples

=> SELECT DAYOFMONTH (TIMESTAMP 'sep 22, 2011 12:34');
 DAYOFMONTH
------------
         22
(1 row)