Re: variable date precision

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: variable date precision
Дата
Msg-id 20031016171125.GC28009@wolff.to
обсуждение исходный текст
Ответ на variable date precision  (christoph.dellavalle@goetheanum.ch)
Список pgsql-novice
On Thu, Oct 16, 2003 at 08:07:01 +0200,
  christoph.dellavalle@goetheanum.ch wrote:
> hi there
>
> i've got a problem with a field set up as type date.  now we discovered that we have to allow not only full dates
(2003-10-16)but also dates where we have only a month or even a year.  we see that it is not a very good practice to
usethe first of the month because it is ambiguous. on the other side, date does not allow entries like "2003-10-00". 
>
> this db already contains quite a few records, so i'm not really keen on changing the data-type.  nevertheless, i'm
interestedin the theoretically correct solution as much as in a practical one, since it is not the first time i've come
acrossthis problem. 
>
> any suggestions are very welcome...

How are you going to use the incomplete dates?

When you say only a month do you mean that there is also no year specified?

One option is to pick an approximate day within a month and/or month within
a year. Another option is to use another column which indicates a precision
for the date.

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

Предыдущее
От: David Rickard
Дата:
Сообщение: Access Privileges
Следующее
От: David Rickard
Дата:
Сообщение: Date Formats and Conversions