Ask how to date plus the incremental or datetime type?

Everybody is good
I want to be a daily recently statistics, statistical data yesterday, yesterday is from 0:00 24:00 data, so I wrote the following SQL -
select count(*) from v_dpnsummary where starttime>(current_date, INTERVAL'-1 days')
Results: HINT: No operator error matches the given name and argument type(s). You might need to add explicit type casts.

Where starttime is the timestamp type, I think, probably because of (current_date, INTERVAL'-1 days') to generate the data type is not timestamp? Excuse me, is this really the case? Or what other date function can give an existing datetime plus interval is still timestamp?
I tried --
select count(*) from v_dpnsummary where starttime> (timestamp current_date, INTERVAL '-1 days'));
And
select count(*) from v_dpnsummary where starttime> (timestamp (current_date, INTERVAL '-1 days'));
All right, please enlighten.

Started by Yolanda at January 09, 2017 - 12:21 PM

Oh, see, the wrong date function PostgreSQL, written
select count(*) from v_dpnsummary where starttime> (current_date-INTERVAL '1 day'));
Can be.
Knot paste, thank you

Posted by Yolanda at January 10, 2017 - 12:45 PM