Syntax
DAYOFMONTH(date)
Purpose
You can call this function to return the ordinal number of the day in the month of date.
Examples
obclient> SELECT DAYOFMONTH('2008-12-31');
+--------------------------+
DAYOFMONTH('2008-12-31')
+--------------------------+
31
+--------------------------+