DAYOFMONTH

Returns the day of the month as an integer.

Behavior Type

  • Immutable if the target 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:

Example

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