First and Last Day of Month – Oracle SQL Syntax Examples

john.kingTechnical Tips8 Comments

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

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

  1. Pingback: First and Last Day of Month – Oracle SQL Syntax Examples | Chris Memo

Leave a Reply to chandra Cancel reply

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