Re: [GENERAL] How to get DATE in server locale format

2010-01-11 Thread Craig Ringer
On 11/01/2010 9:44 PM, A. Kretschmer wrote: In response to Andrus : How to get localized date for single conversion inside SELECT statement so that it works in different server lc_time settings ? As Tom said, you can use to_char(): It looks like the OP wants a localized date, just one differ

Re: [GENERAL] How to get DATE in server locale format

2010-01-11 Thread A. Kretschmer
In response to Andrus : > >You might be able to get what you want with the to_char() function, > >if setting datestyle doesn't do the trick for you. > > setting datestyle changes style for whole sql statement. > > How to get this in a single conversion in sql statement so that other > expression

Re: [GENERAL] How to get DATE in server locale format

2010-01-11 Thread Andrus
You might be able to get what you want with the to_char() function, if setting datestyle doesn't do the trick for you. setting datestyle changes style for whole sql statement. How to get this in a single conversion in sql statement so that other expressions in same sql statement are not affect

Re: [GENERAL] How to get DATE in server locale format

2010-01-11 Thread Tom Lane
"Andrus" writes: > How to get date in server locale format ? You might be able to get what you want with the to_char() function, if setting datestyle doesn't do the trick for you. regards, tom lane -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To

Re: [GENERAL] How to get DATE in server locale format

2010-01-11 Thread Leif Biberg Kristensen
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 -MM-DD > > How to get date in server locale format ? Pg doesn't care about lc_times. http://www.postgresql.org/docs/current/static/data

[GENERAL] How to get DATE in server locale format

2010-01-11 Thread Andrus
Server lc_times contains non-US locale. SELECT CURRENT_DATE::TEXT still returns date in format -MM-DD How to get date in server locale format ? Andrus. -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mai