Re: last dtae of the month

Поиск
Список
Период
Сортировка
От Michael Fuhr
Тема Re: last dtae of the month
Дата
Msg-id 20041003144438.GA28877@winnie.fuhr.org
обсуждение исходный текст
Ответ на last dtae of the month  (Rajesh nalankal <rajeshnalankal@yahoo.com>)
Список pgsql-novice
On Sat, Oct 02, 2004 at 11:41:37PM -0700, Rajesh nalankal wrote:
>
> here is my function to get last day of the month. but it causes
> error while executing.
[snip]
> is there any other alternative to this function like  a builtin
> function like last_day

This should get you started:

SELECT date_trunc('month', CURRENT_DATE + INTERVAL'1 month') - INTERVAL'1 day';

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

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

Предыдущее
От: Rajesh nalankal
Дата:
Сообщение: last dtae of the month
Следующее
От: Vitaly Belman
Дата:
Сообщение: Re: Writing plpgsql not in a function (directly from plsql)?