Re: Date help - Mailing list pgsql-novice

From Garrett Murphy
Subject Re: Date help
Date
Msg-id 076DC33A3D38CE4BBC64D35DDD9DE70C0B13892F@mse4be2.mse4.exchange.ms
Whole thread Raw
In response to Date help  (richard terry <rterry@pacific.net.au>)
Responses Re: Date help  (richard terry <rterry@pacific.net.au>)
List pgsql-novice
> Hi List,
>
> This should be simple but though reading the doc's can't figure it out
- I'm
> hopeless at intrepreting documentation.
>
> I just want to extract from a table containing entries with dates, all
entries
> from within a specified interval eg last month, or last 10 days.
>
> Any help appreciated.
>
> Richard

Your post isn't the clearest, but there are a few ways of accomplishing
this.  Probably the easiest is:
...WHERE date_field>=(CURRENT_DATE-INTERVAL '10 days')
...WHERE date_field>=(CURRENT_DATE-INTERVAL '1 month')
And so on.

pgsql-novice by date:

Previous
From: richard terry
Date:
Subject: Date help
Next
From: richard terry
Date:
Subject: Re: Date help