From: | "Ramil G(dot) Sagum" <ramil(at)astra(dot)ph> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: select date range? |
Date: | 2003-06-17 03:43:47 |
Message-ID: | 1055821427.29605.53.camel@arwen.hq.astra.ph |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
hmm it should work fine. Remember, the statement
....where mydate between '2003/05/12' and '2003/06/17'
would ONLY return records from '2003/05/12 to 2003/06/16 since your type
is a timestamp. 2003/06/17 actually means 2003/06/17 00:00:00.000000+00.
so a timestamp of 2003/06/17 03:01:10.102022+08 would not be included in
the query.
got it?
ramil
On Tue, 2003-06-17 at 10:56, ko wrote:
> Hi,
>
> When I use sql statement to select the date range from $_POST value,It
> doesn't work.
>
> -------------------------------------------
> "select * from mydatabase where mydate between '$_POST[start_date]'
> and '$_POST[end_date]' "
>
> There is no error,but the result is not I want.
>
> ps:
> (1)mydate attribute is timestamp
> (2)$_POST[start_date] is something like '2003/05/12'
>
From | Date | Subject | |
---|---|---|---|
Next Message | Anagha Joshi | 2003-06-17 04:39:04 | Can the frontend get notifications from the postgres server? |
Previous Message | Josh Berkus | 2003-06-17 03:28:46 | Re: select date range? |