Re: date question

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: date question
Дата
Msg-id Pine.LNX.4.44.0306171934390.2043-100000@peter.localdomain
обсуждение исходный текст
Ответ на date question  (javier garcia - CEBAS <rn001@cebas.csic.es>)
Ответы Re: date question  (javier garcia - CEBAS <rn001@cebas.csic.es>)
Список pgsql-sql
javier garcia - CEBAS writes:

> Is there a way to create a table from this table, directly in Postgres in
> which a date field is created based in the values of "year", "month", "day"
> in this table?

year * interval '1 year' + month * interval '1 month' + day * interval '1 day'

This results in a timestamp value that you can compare to or assign to a
date value.

-- 
Peter Eisentraut   peter_e@gmx.net



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [HACKERS] Our FLOAT(p) precision does not conform to spec
Следующее
От:
Дата:
Сообщение: Re: disabling triggers