Does any one know what is the reason not to put this logic into date_trunc () function?
It seems to work with pretty much *any* unit imaginable, *except* for 'week'...
Dima
Bruno Wolff III wrote:
> On Thu, Sep 26, 2002 at 11:55:48 -0400,
> Jean-Luc Lachance <[EMAIL PROTECTED]> wrote:
>
>>How
On Thu, Sep 26, 2002 at 11:55:48 -0400,
Jean-Luc Lachance <[EMAIL PROTECTED]> wrote:
> How about:
>
> select now() - date_part( 'DOW', now()) as starts_on,
> now() -date_part( 'DOW', now()) + 6 as ends_on;
That won't work in 7.3.
The following works in both 7.2 and 7.3:
area=> select curre
How about:
select now() - date_part( 'DOW', now()) as starts_on,
now() -date_part( 'DOW', now()) + 6 as ends_on;
"John Sebastian N. Mayordomo" wrote:
>
> How do I get the start and end date of the present week?
> Is this possible?
>
> For example this week
> Start = Sept. 22
> End = Sept
On Thu, Sep 26, 2002 at 18:56:46 +0800,
"John Sebastian N. Mayordomo" <[EMAIL PROTECTED]> wrote:
>
>
> How do I get the start and end date of the present week?
> Is this possible?
>
> For example this week
> Start = Sept. 22
> End = Sept. 28
The following advice will work on 7.3. For 7.2.
How do I get the start and end date of the present week?
Is this possible?
For example this week
Start = Sept. 22
End = Sept. 28
Thank you very much.
---(end of broadcast)---
TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]