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 |
@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
Would need to know what type of database you are connecting to. The date format differs from database to database.
I use snowflake, the date column looks like this,
what should i write in filter-in-db to filter only today's date? thanks
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');
User | Count |
---|---|
60 | |
24 | |
24 | |
21 | |
21 |