0

How can I write ZOQL (Zuora SQL) function which returns yesterday date?

I can not write this function. Zuora contains date_add function but I don't know the right syntax.

I tried to write this function with current term expression.

Maybe you can help me?

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129

2 Answers2

0

You can use below syntax in ZOQL. This is part of special date/time feature provided as part of zoql.

Select * from object where UpdatedDate = 'today - 1 day'

if you need to include date timestamp and go back exact one day, use 'now' instead of 'today' as shown below.

Select * from object where UpdatedDate = 'now - 1 day'

let me know if it helps.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Rajeev
  • 29
  • 1
  • 7
0
SELECT DATE_ADD('DAY', -1, current_date)
cigien
  • 57,834
  • 11
  • 73
  • 112