------=_Part_12803_3737840.1209055146769
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
It would be rather :
test=*# select date_trunc('month', current_date), date_trunc('month',
current_date)+'1month':
>
> :interval-'1sec'::interval;
"2008-04-01 00:00:00+02";"2008-04-30 23:59:59+02"
On Thu, Apr 24, 2008 at 3:15 PM, A. Kretschmer <
andreas.kretschmer@[EMAIL PROTECTED]
> wrote:
> am Thu, dem 24.04.2008, um 14:59:47 +0200 mailte Nacef LABIDI
folgendes:
> > Hi all,
> >
> > I want to select data from a table according to a date column in my
> table. I
> > want to select all the rows which have date in the current month. So
is
> there a
> > way to get from the actual date the first day and the last day of the
> month or
>
> test=*# select date_trunc('month', current_date), date_trunc('month',
> current_date)+'1month'::interval-'1day'::interval;
> date_trunc | ?column?
> ------------------------+------------------------
> 2008-04-01 00:00:00+02 | 2008-04-30 00:00:00+02
>
>
>
> --
> Andreas Kretschmer
> Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
> GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@[EMAIL PROTECTED]
)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>
------=_Part_12803_3737840.1209055146769
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
It would be rather :<br><br>test=*# select date_trunc('month',
current_date), date_trunc('month',
current_date)+'1month':<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt
0.8ex; padding-left: 1ex;">
:interval-'1sec'::interval;</blockquote><div><br>"2008-04-01
00:00:00+02";"2008-04-30 23:59:59+02"
<br></div><br><br><div class="gmail_quote">On Thu, Apr 24, 2008 at 3:15
PM, A. Kretschmer <<a
href="mailto:andreas.kretschmer@[EMAIL PROTECTED]
">andreas.kretschmer@[EMAIL PROTECTED]
>>
wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204,
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">am Thu,
dem 24.04.2008, um 14:59:47 +0200 mailte Nacef LABIDI folgendes:<br>
<div class="Ih2E3d">> Hi all,<br>
><br>
> I want to select data from a table according to a date column in my
table. I<br>
> want to select all the rows which have date in the current month. So
is there a<br>
> way to get from the actual date the first day and the last day of the
month or<br>
<br>
</div>test=*# select date_trunc('month', current_date),
date_trunc('month',
current_date)+'1month'::interval-'1day'::interval;<br>
date_trunc |
?column?<br>
------------------------+------------------------<br>
2008-04-01 00:00:00+02 | 2008-04-30 00:00:00+02<br>
<font color="#888888"><br>
<br>
<br>
--<br>
Andreas Kretschmer<br>
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: ->
Header)<br>
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA <a
href="http://wwwkeys.de.pgp.net"
target="_blank">http://wwwkeys.de.pgp.net</a><br>
</font><div><div></div><div class="Wj3C7c"><br>
--<br>
Sent via pgsql-sql mailing list (<a
href="mailto:pgsql-sql@[EMAIL PROTECTED]
">pgsql-sql@[EMAIL PROTECTED]
>)<br>
To make changes to your subscription:<br>
<a href="http://www.postgresql.org/mailpref/pgsql-sql"
target="_blank">http://www.postgresql.org/mailpref/pgsql-sql</a><br>
</div></div></blockquote></div><br>
------=_Part_12803_3737840.1209055146769--


|
15 Posts in Topic:
|
nacef.l@[EMAIL PROTECTED] |
2008-04-24 14:59:47 |
|
fbax@[EMAIL PROTECTED]
( |
2008-04-24 09:06:25 |
|
fbax@[EMAIL PROTECTED]
( |
2008-04-24 09:16:03 |
|
andreas.kretschmer@[EMAIL |
2008-04-24 15:15:36 |
|
cww@[EMAIL PROTECTED]
(C |
2008-04-24 10:15:23 |
|
erik@[EMAIL PROTECTED]
( |
2008-04-24 09:41:04 |
|
nacef.l@[EMAIL PROTECTED] |
2008-04-24 16:43:40 |
|
scott.marlowe@[EMAIL PROT |
2008-04-24 08:55:31 |
|
fhevia@[EMAIL PROTECTED]
|
2008-04-24 12:10:34 |
|
scott.marlowe@[EMAIL PROT |
2008-04-24 08:56:50 |
|
erik@[EMAIL PROTECTED]
( |
2008-04-24 10:08:10 |
|
scott.marlowe@[EMAIL PROT |
2008-04-24 09:16:01 |
|
scott.marlowe@[EMAIL PROT |
2008-04-24 09:44:44 |
|
fhevia@[EMAIL PROTECTED]
|
2008-04-24 13:07:19 |
|
nacef.l@[EMAIL PROTECTED] |
2008-04-24 18:39:06 |
|