Re: time
| От | Michael Fuhr |
|---|---|
| Тема | Re: time |
| Дата | |
| Msg-id | 20051110182139.GA87715@winnie.fuhr.org обсуждение исходный текст |
| Ответ на | Re: time (Rod Taylor <pg@rbt.ca>) |
| Ответы |
Re: time
Re: time |
| Список | pgsql-sql |
On Thu, Nov 10, 2005 at 01:11:27PM -0500, Rod Taylor wrote:
> rbt=# select cast(now() - date_trunc('day', now()) as time);
> time
> -----------------
> 13:10:42.495579
> (1 row)
Am I missing something? Is there a reason not to simply cast the
timestamp value to time?
test=> select cast(now() - date_trunc('day', now()) as time); time
---------------------11:19:19.8921250105
(1 row)
test=> select now()::time; now
-----------------11:19:19.892125
(1 row)
test=> select cast(now() as time); now
-----------------11:19:19.892125
(1 row)
--
Michael Fuhr
В списке pgsql-sql по дате отправления: