Re: How can I get first day date of the previous month ?

Поиск
Список
Период
Сортировка
От Michael Paquier
Тема Re: How can I get first day date of the previous month ?
Дата
Msg-id CAB7nPqR5kh3zPajY5_D=BR_awDOYVxmsJVP2qrg0uKkS8E-1TA@mail.gmail.com
обсуждение исходный текст
Ответ на How can I get first day date of the previous month ?  (Arup Rakshit <aruprakshit@rocketmail.com>)
Ответы Re: How can I get first day date of the previous month ?
Список pgsql-general
On Fri, Jun 20, 2014 at 3:42 PM, Arup Rakshit
<aruprakshit@rocketmail.com> wrote:
> How can I get first day date of the previous month. Last day of previous
> month can be found using the answer -
> http://stackoverflow.com/a/8945281/2767755
Here is how to get the first day date of the previous month:
=# select date_trunc('month', now()) - interval '1 month' as last_month;
       last_month
------------------------
 2014-05-01 00:00:00+09
(1 row)
--
Michael


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

Предыдущее
От: Arup Rakshit
Дата:
Сообщение: How can I get first day date of the previous month ?
Следующее
От: Arup Rakshit
Дата:
Сообщение: Re: How can I get first day date of the previous month ?