Re: Selecting rows where timestamp between two timestamps
В списке pgsql-general по дате отправления:
| От | Michael Fuhr |
|---|---|
| Тема | Re: Selecting rows where timestamp between two timestamps |
| Дата | |
| Msg-id | 20070813143728.GA91805@winnie.fuhr.org обсуждение исходный текст |
| Ответ на | Selecting rows where timestamp between two timestamps (Jeff Lanzarotta <delux256-postgresql@yahoo.com>) |
| Ответы |
Re: Selecting rows where timestamp between two timestamps
|
| Список | pgsql-general |
On Mon, Aug 13, 2007 at 07:16:30AM -0700, Jeff Lanzarotta wrote: > select * from foobar where ts between now() and now() - interval '5 days' > > btw, the column ts is defined as: > > ts timestamp with time zone NOT NULL DEFAULT now() > > No rows are returned, but I know there are at least 100 rows that should be returned... Put the lower value first or use BETWEEN SYMMETRIC: select * from foobar where ts between now() - interval '5 days' and now() select * from foobar where ts between symmetric now() and now() - interval '5 days' -- Michael Fuhr
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера