Search Postgresql Archives

Re: Converting a timestamp to a time

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mark Morgan Lloyd <markMLl.pgsql-general@xxxxxxxxxxxxxxx> schrieb:
> What is the correct (or even any :-) way of converting a timestamp into a time
> (without timezone etc.)?

You can CAST it:

test=# select now();
              now
-------------------------------
 2006-11-05 11:16:05.205235+01
(1 row)

test=# select now()::time;
      now
----------------
 11:16:18.22527
(1 row)



Andreas
-- 
Really, I'm not out to destroy Microsoft. That will just be a completely
unintentional side effect.                              (Linus Torvalds)
"If I was god, I would recompile penguin with --enable-fly."    (unknow)
Kaufbach, Saxony, Germany, Europe.              N 51.05082°, E 13.56889°


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux