Re: Creating timestamps in queries?

Поиск
Список
Период
Сортировка
От Patrik Kudo
Тема Re: Creating timestamps in queries?
Дата
Msg-id Pine.BSF.4.21.0007110906450.27659-100000@tb303.partitur.se
обсуждение исходный текст
Ответ на Creating timestamps in queries?  ("Rob S." <rslifka@home.com>)
Список pgsql-sql
Hi Rob,

Try this:

select * from blah where stamp >= now()::date - 7;

I think it should work.

/Patrik Kudo

On Mon, 10 Jul 2000, Rob S. wrote:

> Hi all,
> 
> I would like to say,
> 
> "select * from blah where stamp >= 7 days ago"
> 
> ...where the "days ago" is calculated at query time; meaning that its not
> hardcoded into the query as a date string.  Is this possible?



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Rob S."
Дата:
Сообщение: Creating timestamps in queries?
Следующее
От: Paul McGarry
Дата:
Сообщение: Checking for existence of table