Обсуждение: now 7.2.3 - 7.3.3

Поиск
Список
Период
Сортировка

now 7.2.3 - 7.3.3

От
"A. Van Hook"
Дата:
this worked in 7.2.3"select sum(cr) from ar where date(tdate) = now() -1 "
but not in 7.3.3
What's the proper syntax for 7.3.3???

thanks







Re: now 7.2.3 - 7.3.3

От
Peter Eisentraut
Дата:
A. Van Hook writes:

> this worked in 7.2.3
>  "select sum(cr) from ar where date(tdate) = now() -1 "
> but not in 7.3.3
> What's the proper syntax for 7.3.3???

now() - interval '1 day/minute/year/second/???'

-- 
Peter Eisentraut   peter_e@gmx.net


Re: now 7.2.3 - 7.3.3

От
Tom Lane
Дата:
"A. Van Hook" <hook@kcp.com> writes:
> this worked in 7.2.3
>  "select sum(cr) from ar where date(tdate) = now() -1 "
> but not in 7.3.3
> What's the proper syntax for 7.3.3???

Perhaps you want current_date - 1.
        regards, tom lane