Re: How can I get first day date of the previous month ? - Mailing list pgsql-general

From Michael Paquier
Subject Re: How can I get first day date of the previous month ?
Date
Msg-id CAB7nPqR5kh3zPajY5_D=BR_awDOYVxmsJVP2qrg0uKkS8E-1TA@mail.gmail.com
Whole thread Raw
In response to How can I get first day date of the previous month ?  (Arup Rakshit <aruprakshit@rocketmail.com>)
Responses Re: How can I get first day date of the previous month ?
List 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 by date:

Previous
From: Arup Rakshit
Date:
Subject: How can I get first day date of the previous month ?
Next
From: Arup Rakshit
Date:
Subject: Re: How can I get first day date of the previous month ?