이번달의 첫번째 날과 마지막 날 구하기 입니다.

 

SELECT cast(date_trunc('month',current_date) as date) as firstday, (date_trunc('MONTH', current_date) + INTERVAL '1 MONTH - 1 day')::date lastday;

실행 결과

 

+ Recent posts