In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

SQL Date filters - functions

rgvital
5 - Atom

I'm looking to see if it's possible to apply a date filter in the SQL of a data pull rather than use the filter "tool".  As I want the filter selection on the database, not within Alteryx.

 

Here's a hard coded version of what I have against a Hive ODBC connection...

 

where business_dt = date('2024-09-02')

 

But I would like to have..

 

where  business_dt = date(PriorBusinessDate)

 

Is there a function I can use within SQL to accomplish this?

thanks

2 REPLIES 2
alexnajm
19 - Altair
19 - Altair

@rgvital while many people can probably help, this seems like more of a SQL question than an Alteryx question. The SQL may also depend on if its SQL Server, Snowflake, Oracle, etc.

 

As a start,, here's something: How to get Previous business day in a week with that of current Business Day using sql server - Stac...

TUSHAR050392
11 - Bolide

Hey @rgvital There is no function which can give you previous business date in SQL. You might have to use some database which gives you details on whether a business date was a working day, weekend or holiday and then on top of that you can build a macro to give you the previous business date in alteryx

Labels
Top Solution Authors