day
- The day (of the month) field (1 - 31)
+ For timestamp values, the day (of the month) field
+ (1 - 31) ; for interval values, the number of days
SELECT EXTRACT(DAY FROM TIMESTAMP '2001-02-16 20:38:40');
Result: 16
+
+SELECT EXTRACT(DAY FROM INTERVAL '40 days 1 minute');
+Result: 40
+
+
+
For timestamp values, the number of the month
- within the year (1 - 12) ; for interval values
+ within the year (1 - 12) ; for interval values,
the number of months, modulo 12 (0 - 11)