now 7.2.3 - 7.3.3

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

now 7.2.3 - 7.3.3

От:
"A. Van Hook" <hook@kcp.com>
Дата:
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 <peter_e@gmx.net>
Дата:
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 <tgl@sss.pgh.pa.us>
Дата:
"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???

Perhaps you want current_date - 1.
		regards, tom lane

FAQ