Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- https://pgexercises.com/questions/date/interval2.html
- select date_part('epoch', '2012-09-02 00:00:00'::timestamp - '2012-08-31 01:00:00'::timestamp)
- -- returns 169200, which is accepted as correct
- select count(*) from generate_series
- ('2012-08-31 01:00:00'::timestamp,
- '2012-09-02 00:00:00'::timestamp,
- '1 second'::interval) as gs
- -- returns 169201, which is not accepted
Add Comment
Please, Sign In to add comment