Re: select date range?
От | Ramil G. Sagum |
---|---|
Тема | Re: select date range? |
Дата | |
Msg-id | 1055821427.29605.53.camel@arwen.hq.astra.ph обсуждение исходный текст |
Ответ на | select date range? ("ko" <ko@origo.com.tw>) |
Список | 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' >
В списке pgsql-sql по дате отправления: