In case you missed the announcement: Alteryx One is here, and so is the Spring Release! Learn more about these new and exciting releases here!

Alteryx Designer Desktop Discussions

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

Filter DateTime field using SQL

munchkin100
7 - Meteor

I am trying to extract some data from one of the data sources. Because of its size, I want to extract only the data after 2017-01-01. My problem is that, its a DateTime field and I have no idea how to specify it in the SQL. I would really appreciate some help with this.

 

All data before any filters

munchkin100_0-1630506577475.png

 

 my sql, which didnt work

munchkin100_1-1630506659903.png

 

Error: Input Data (6): DataWrapOCI: Unable to prepare the query: "select CATREPORT.PPAP.CREATED_DATE
from CATREPORT.PPAP
where CATREPORT.PPAP.CREATED_DATE >= '2017-01-01 00:00:00'" Error: ORA-01861: literal does not match format string

 

 

 

2 REPLIES 2
jrgo
14 - Magnetar

I believe it's because Oracles default date format is not set to the ISO 8601 standard (what Alteryx uses). Take a look at the link below which may help to understand what's going on and how to work around it.

 

https://www.oracletutorial.com/oracle-basics/oracle-date/

 

munchkin100
7 - Meteor

@jrgo Thank you for your link! TO_DATE made a trick. Hopefully it will save someone else's life as well 😉

munchkin100_0-1630507192215.png

 

Labels
Top Solution Authors