You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary
Similar to EXTRACT from timestamp, allow EXTRACT from an interval to give the various parts. For interval type,
EPOCH == total number of seconds
DAY == number of days
HOUR == number of hours
MINUTE == number of minutes
SECOND == number of seconds
MICROSECONDS == seconds * 1,000,000
e.g.
select EXTRACT(day from '1 day 2 hours 3 minutes'::INTERVAL)
93780
select EXTRACT(day from '1 day 2 hours 3 minutes'::INTERVAL)
1
select EXTRACT(hour from '1 day 2 hours 3 minutes'::INTERVAL)
2
select EXTRACT(minute from '1 day 2 hours 3 minutes'::INTERVAL)
3
SELECT EXTRACT(second from '1 day 02:03:04.1234'::INTERVAL);
4.1234
SELECT EXTRACT(microsecond from '1 day 02:03:04.1234'::INTERVAL);
4123400
The text was updated successfully, but these errors were encountered:
Summary
Similar to EXTRACT from timestamp, allow EXTRACT from an interval to give the various parts. For interval type,
EPOCH == total number of seconds
DAY == number of days
HOUR == number of hours
MINUTE == number of minutes
SECOND == number of seconds
MICROSECONDS == seconds * 1,000,000
e.g.
The text was updated successfully, but these errors were encountered: