From: | Chris Gamache <cgg007(at)yahoo(dot)com> |
---|---|
To: | Christopher Kings-Lynne <chriskl(at)familyhealth(dot)com(dot)au>, shridhar_daithankar(at)persistent(dot)co(dot)in, pgsql-general <pgsql-general(at)postgresql(dot)org> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: [HACKERS] Extracting time from timestamp |
Date: | 2003-03-23 16:01:13 |
Message-ID: | 20030323160113.96420.qmail@web13802.mail.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
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(at)familyhealth(dot)com(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-03-23 17:47:46 | Re: ssl |
Previous Message | Jason | 2003-03-23 14:38:19 | Re: ssl |
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Brown | 2003-03-23 23:30:04 | Re: SQL99 ARRAY support proposal |
Previous Message | ow | 2003-03-23 13:21:19 | Re: Case insensitivity, and option? |