Re: date
От
Ken Hill
Тема
Re: date
Дата
Msg-id
1139588221.29808.7.camel@localhost.localdomain
Ответ на
Re: date (A. Kretschmer)
Список
Дерево обсуждения
On Fri, 2006-02-10 at 07:38 +0100, A. Kretschmer wrote:You could also try using the data_part() function:am 09.02.2006, um 22:18:09 -0800 mailte superboy143 (sent by Nabble.com) folgendes: > > Hello, > > How can I write an sql query in postgresql so that I can insert a date into > a table in the format DD-MM-YYYY, and when I select the date from the table > I should get the date in the same format. You can't define the format in the db, but you can define the output-format with to_char(date, 'DD-MM-YYYY'); HTH, Andreas
date_part('month',date)||-||date_part('day',date)||-||date_part('year',date)
But I think Andreas' suggestion is a bit more elegant.
В списке pgsql-sql по дате отправления