Re: date formatting question

Поиск
Список
Период
Сортировка
От Frank Bax
Тема Re: date formatting question
Дата
Msg-id 486CA9A8.5080502@sympatico.ca
обсуждение исходный текст
Ответ на date formatting question  (richard terry <rterry@gnumed.net>)
Список pgsql-novice
richard terry wrote:
> I'm using gambas to save some data to the database, and use the date from a
> textbox to write to the database in format 'dd/mm/yyyy', however when I look
> at the database using pgadmin3 , the date is stored as eg 2008/10/02
> yyyy/dd/mm.
>
> If I re-display it with  a formatting option like:
> Format(referral.date, "dd/mm/yyyy")    then it looks ok in my program
>
> does it matter that is 'round the wrong way' in the database, or is there some
> way to tell the database to do it the other way around.


Actually; that is NOT how a date is stored in the database; what you see
is the default format being applied:

http://www.postgresql.org/docs/8.3/interactive/runtime-config-client.html#GUC-DATESTYLE

You can (perhaps you'll need more than one):
1) change the default datestyle in postgressql.conf
2) change datestyle with every connection "set datestyle ..."
3) change default datestyle in pgadmin3 (maybe; I don't use this).

Frank

В списке pgsql-novice по дате отправления:

Предыдущее
От: Dmitry Melekhov
Дата:
Сообщение: please explain vacuum with WAL
Следующее
От: Netzach
Дата:
Сообщение: Re: Calculating repeating events - functionality lost with the demise of tinterval ?