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

convert time format retuned by a select query

From: Johan Martinez <jmartiee(at)gmail(dot)com>
To: pgsql-novice <pgsql-novice(at)postgresql(dot)org>
Subject: convert time format retuned by a select query
Date: 2011-12-08 22:45:52
Message-ID: (view raw or whole thread)
Lists: pgsql-novice
I would like to subtract two columns - create_time and update_time of
'timestamp without time zone' type and then order results based on
subtraction-result (time interval). I checked ,
however these examples didn't work with actual column values. e.g.something
'select epoch (update_time) - epoch (create_time) AS Column1 from users
order by Column1; '

Any hints or documentation liks will be really nice. Thanks.



pgsql-novice by date

Next:From: Michael RowanDate: 2011-12-08 22:53:31
Subject: pgAdmin3 grant wizard question
Previous:From: Steve CrawfordDate: 2011-12-08 16:01:36
Subject: Re: Big wide datasets

Privacy Policy | About PostgreSQL
Copyright © 1996-2015 The PostgreSQL Global Development Group