Previous Exercise
Next Exercise
select extract(day from timestamp '2012-08-31');
The EXTRACT function is used for getting sections of a timestamp or interval. You can get the value of any field in the timestamp as an integer.