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/