Time without seconds

From: Andreas Kraftl <andreas(dot)kraftl(at)kraftl(dot)at>
To: pgsql-general(at)postgresql(dot)org
Subject: Time without seconds
Date: 2008-12-02 10:37:05
Message-ID: 1228214225.8137.26.camel@zeus
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

is it possible to get the time without the seconds and without the usage
of a formatting function?

Example:
CREATE TABLE test.testtime
(
thetime time without time zone
);
INSERT INTO test.testtime (thetime) VALUES ('12:34:56');
INSERT INTO test.testtime (thetime) VALUES ('23:45');
SELECT thetime from test.testtime;
The result should be without the seconds.

I know that there are formatting functions for date/time. But I am
searching for a way to get a formatted time with a simple SQL query.

Thanks
Andreas

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Hermann Muster 2008-12-02 10:37:45 dblink can't query a password with a space
Previous Message Zoltan Boszormenyi 2008-12-02 10:09:53 Re: Favorite Tom Lane quotes