This is an equivalent of DAY function in Oracle. To achieve this you will need to use the EXTRACT statement. dbadmin= select now(); now ------------------------------- 2014-03-13 13:46:17.722358-03 (1 row) dbadmin= SELECT EXTRACT (DAY FROM DATE 'now()'); date_part ----------- 13 (1 row) dbadmin= SELECT EXTRACT (DAY FROM DATE '2012-01-11'); date_part ----------- 11 (1 row)
dbadmin= select now(); now ------------------------------- 2014-03-13 13:46:17.722358-03 (1 row) dbadmin= SELECT EXTRACT (DAY FROM DATE 'now()'); date_part ----------- 13 (1 row) dbadmin= SELECT EXTRACT (DAY FROM DATE '2012-01-11'); date_part ----------- 11 (1 row)