Re: [SQL] function to find difference between in days between two dates
В списке pgsql-general по дате отправления:
| От | Pavel Stehule |
|---|---|
| Тема | Re: [SQL] function to find difference between in days between two dates |
| Дата | |
| Msg-id | 162867790706140000w478d4bds4a0a2f42a8666a26@mail.gmail.com обсуждение исходный текст |
| Ответ на | function to find difference between in days between two dates ("Ashish Karalkar" <ashish.karalkar@info-spectrum.com>) |
| Ответы |
Re: [SQL] function to find difference between in days between two dates
|
| Список | pgsql-general |
Hello PostgreSQL hasn't any official function for it. If you need it, you can write own function CREATE FUNCTION date_diff(date, date) returns integer as $$ select $1-$2; $$ language sql; Regards Pavel Stehule 2007/6/14, Ashish Karalkar <ashish.karalkar@info-spectrum.com>: > > > Hello all, > > Is there any function to find differences in days between two dates? > > > I am using > > select abs(current_date - '2007-06-15') > > to get the desired result. > but I think there must be a function and I am missing it, > if so, can anybody please point me to that. > > > Thanks in advance > > With regards > Ashish Karalkar > > >
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера