Re: [HACKERS] Extracting time from timestamp - Mailing list pgsql-general

From Chris Gamache
Subject Re: [HACKERS] Extracting time from timestamp
Date
Msg-id 20030323160113.96420.qmail@web13802.mail.yahoo.com
Whole thread Raw
In response to Re: [HACKERS] Extracting time from timestamp  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
List pgsql-general
Why not a cast?

template1=# select current_timestamp::time;
      time
-----------------
 11:24:22.004207
(1 row)

template1=# select current_timestamp::time(0);
   time
----------
 11:24:26
(1 row)


--- Christopher Kings-Lynne <chriskl@familyhealth.com.au> wrote:
> > phd=# select time(abstime(timestamp 'now')) from bookings;
> > ERROR:  parser: parse error at or near "abstime" at character 13
> > phd=# select time(timestamp 'now') from bookings;
> > ERROR:  parser: parse error at or near "timestamp" at character 13
> > phd=# select version();
> >                                version
>
> Try:
>
> select "time"(abstime(timestamp 'now')) from bookings;
> select "time"(timestamp 'now') from bookings;
>
> Chris
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/docs/faqs/FAQ.html


__________________________________________________
Do you Yahoo!?
Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop!
http://platinum.yahoo.com


pgsql-general by date:

Previous
From: "Jason"
Date:
Subject: Re: ssl
Next
From: Tom Lane
Date:
Subject: Re: ssl