Search Postgresql Archives

Re: localtime(0)

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

 



"Raymond O'Donnell" <rod@xxxxxx> writes:
> On 29/12/2014 17:25, Suresh Raja wrote:
>> clock_timestamp() gives more than I need. i just need time, - no date,
>> or msec or timezone.  How can i get to print the current time alone.

> Please don't top-post; the convention on this list is to bottom-post, as
> it makes discussions easier to follow.

> Depending on your needs, you could use to_char() to format the value of
> clock_timestamp() as you wish. This outputs a string rather than a time
> value, but would be fine for logging, say.

EXTRACT() might help, too.

			regards, tom lane


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[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