Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
gerhardl
Creator II
Creator II

Use Yesterday in expression

Hi,

please help me with this expression - cannot get it right:

Count({<[Posted Date]={"=date(today()-1)"}>} [Trans Amount])

I want to count the number of transactions that have a Posted Date of Yesterday.

Thanks in advance,

Gerhard

13 Replies
tresesco
MVP
MVP

use date format as 'YYYY/MM/DD'... it would work.

as

Count({<[Posted Date]={"=$(=date(today()-1,'YYYY/MM/DD'))"}>} [Trans Amount])

See attachment

gerhardl
Creator II
Creator II
Author

I have QV Personal Edition so can't open your file - but I literally copy and paste that expression as it is and use it in the file I just uploaded and it does not work.

It returns a count of 4 payments received, when only 2 were received on 2012/08/30.

Not applicable

Count({<[Posted Date]={"$(=date(vYESTERDAY))"}>} [Trans Amount])

you use [Posted date] instead [Posted Date]

gerhardl
Creator II
Creator II
Author

Yes, thanks!

That's why I added that variable - then I made that stupid mistake. It works now.

Still don't understand why

Count({<[Posted Date]={"=$(=date(today()-1,'YYYY/MM/DD'))"}>} [Trans Amount])

doesn't work - but not matter.