Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Getting yesterday day from sql editor

Primus
6 - Meteoroid

I am connecting to a input data  thru ODBC its a Oracle server  the process date is formatted 2020-05-11 00:00:00 I need automatically get yesterday day  if I hard coded it works Date>={ts '2020-05-11 00:00:00.000'}) thanks for assistance

3 REPLIES 3
AbhilashR
15 - Aurora
15 - Aurora

Hi @Primus, you could use DATE = SYSDATE-1 to get yesterday's date. Let us know if this isn't what you were looking for.

Primus
6 - Meteoroid

It brought back 0 entries   I used

PROCESS_DATE = SysDate - 1

 when I used >={ts '2020-05-01 00:00:00.000'} it works

I'm trying to do it in SQL editor i

AbhilashR
15 - Aurora
15 - Aurora

The date in your query indicates you are looking to get data from May 1 and no necessarily today - 1. Maybe try >= SYSDATE - 1 and see if that works? Sysdate is basically an oracle function that gives you today's date, and Sysdate - 1 should give you yesterday's date.

Labels