We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

how to get today IN-DB?

ryanzhang487
8 - Asteroid

HI community, I have a date column like this, I would want to filter out the data IN DB if the column is today(), what will be the command code?

Thank you so much

 

DATE
20230821
23230823
20230822
4 REPLIES 4
FinnCharlton
13 - Pulsar

@ryanzhang487 I imagine you'll have to find a relevant SQL command to find todays date, and works in the database you're using. Possible commands are SYSDATE, GETDATE or CURRENT_DATE

cjaneczko
13 - Pulsar

Would need to know what type of database you are connecting to. The date format differs from database to database.

ryanzhang487
8 - Asteroid

I use snowflake, the date column looks like this,

Screenshot 2023-08-23 132742.png

what should i write in filter-in-db to filter only today's date? thanks

Screenshot 2023-08-23 132847.png

 

 

apathetichell
20 - Arcturus

 

CURRENT_DATE() 

would give you the current date in snowflake

if that is your snowflake native date format it would render that way - otherwise you'd convert with

 

to_char(CURRENT_DATE(), 'YYYYMMDD');

Labels
Top Solution Authors