Re: SQL doubt - Date Add

Поиск
Список
Период
Сортировка
От Gaetano Mendola
Тема Re: SQL doubt - Date Add
Дата
Msg-id 41694906.3030408@bigfoot.com
обсуждение исходный текст
Ответ на SQL doubt - Date Add  (sreejith s <getsreejith@gmail.com>)
Ответы Re: SQL doubt - Date Add  (Richard Huxton <dev@archonet.com>)
Список pgsql-sql
sreejith s wrote:
> Hi friends,
>               I problem is i want to add a specified no. of years to a
> given date
> ie, 12/12/2004 + 5 = 12/12/2009. This has to be done via sql. Any 
> predefined function there for the same. or v have split the yr and
> then add.
> Sreejith
>

# select '2004-12-12'::date + 5 * '1 year'::interval;      ?column?
--------------------- 2009-12-12 00:00:00
(1 row)



Regards
Gaetano Mendola




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

Предыдущее
От: Gaetano Mendola
Дата:
Сообщение: Re: SQL doubt - Date Add
Следующее
От: Theo Galanakis
Дата:
Сообщение: Export tab delimited from mysql to postgres.