Re: [HACKERS] Extracting time from timestamp

Поиск
Список
Период
Сортировка
От Chris Gamache
Тема Re: [HACKERS] Extracting time from timestamp
Дата
Msg-id 20030323160113.96420.qmail@web13802.mail.yahoo.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Extracting time from timestamp  ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>)
Список 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 по дате отправления:

Предыдущее
От: "Jason"
Дата:
Сообщение: Re: ssl
Следующее
От: Tom Lane
Дата:
Сообщение: Re: ssl