Search Postgresql Archives

Re: How to get DATE in server locale format

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

 



On Sunday 10. January 2010 22.57.38 Andrus wrote:
> Server lc_times contains non-US locale.
> 
> SELECT CURRENT_DATE::TEXT
> 
> still returns date in format YYYY-MM-DD
> 
> How to get date in server locale format ?

Pg doesn't care about lc_times.

http://www.postgresql.org/docs/current/static/datatype-datetime.html#datatype-
datetime-output2-table

pgslekt=> SELECT CURRENT_DATE::TEXT;
    text
------------
 2010-01-11
(1 row)

pgslekt=> set datestyle to german;
SET
pgslekt=> SELECT CURRENT_DATE::TEXT;
    text
------------
 11.01.2010
(1 row)

regards,
-- 
Leif Biberg Kristensen
http://solumslekt.org/

-- 
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