Re: [SQL] TO_CHAR or TO_DATE

Поиск
Список
Период
Сортировка
От Clark Evans
Тема Re: [SQL] TO_CHAR or TO_DATE
Дата
Msg-id 370230D5.DA694942@manhattanproject.com
обсуждение исходный текст
Ответ на where can I get...  (ZioBudda <michel@michel.enter.it>)
Список pgsql-sql
Chairudin Sentosa wrote:
> How to do it the right way to insert only month and year?

You don't, it is necessary to have a day as well.  Use
the first of the month, and ignore the day in your program.
Thus, insert into table values ( '1-MAR-1999' );

Alternatively, you could create your own type and work out
all the semantics necessary to only manage months.  This sounds
interesting actually, only I would do 'week' rather than month.

Clark


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

Предыдущее
От: miannaco@csc.com
Дата:
Сообщение: merging date and time
Следующее
От: ZioBudda
Дата:
Сообщение: error -dl-