Re: Create Datefield from 3 fields

Поиск
Список
Период
Сортировка
От Thomas Kellerer
Тема Re: Create Datefield from 3 fields
Дата
Msg-id i8hmvg$mqd$1@dough.gmane.org
обсуждение исходный текст
Ответ на Create Datefield from 3 fields  (Andreas Forø Tollefsen <andreasft@gmail.com>)
Ответы Re: Create Datefield from 3 fields  (Andreas Forø Tollefsen <andreasft@gmail.com>)
Список pgsql-sql
Andreas Forø Tollefsen, 06.10.2010 13:11:
> Hi.
>
> I am trying to create a datefield using YEAR, MONTH and DAY fields of type integer.
> I tried this query, but it did not give good results:
> select to_date(gwsyear::text || gwsmonth::text || gwsday::text, 'YYYY-MM-DD') FROM cshapes

You are missing the dashes in the input string that you specify in the format mask
  to_date(gwsyear::text ||'-'|| gwsmonth::text ||'-'|| gwsday::text, 'YYYY-MM-DD')


Thomas



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

Предыдущее
От: Andreas Forø Tollefsen
Дата:
Сообщение: Create Datefield from 3 fields
Следующее
От: Andreas Forø Tollefsen
Дата:
Сообщение: Re: Create Datefield from 3 fields