Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: How cast interval to minutes as number?



Andreas Kretschmer schrieb:
Andreas <maps(dot)on(at)gmx(dot)net> schrieb:
This results in a column of type  interval.
 How would I get this interval converted into e.g. minutes.

Okay, lets assume i want to know how old is my daughter, in minutes:
test=# select EXTRACT (EPOCH FROM  now() - '2007-07-28 09:15:00'::timestamp )::int/60;
Thanks and congratulations   ;-)

Andreas



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group