select EXTRACT(DAY FROM now()); select EXTRACT(MONTH FROM now()); select EXTRACT(YEAR FROM now());
Get current date, month, and year (return type is TEXT) :
select to_char(now(), 'YYYY'); -- year (4 and more digits) select to_char(now(), 'MM'); -- month number (01-12) with leading zero select to_char(now(), 'DD'); -- day of month (01-31) with leading zero
For complete complete documentation : to_char