First and Last Day of Month – Oracle SQL Syntax Examples

First Day of Current Month

1
SELECT trunc(sysdate) - (to_number(to_char(sysdate,'DD')) - 1) FROM dual

Last Day of Current Month

1
SELECT add_months(trunc(sysdate) - (to_number(to_char(sysdate,'DD')) - 1), 1) -1 FROM dual

7 Comments on “First and Last Day of Month – Oracle SQL Syntax Examples”

Leave a Reply

Your email address will not be published. Required fields are marked *