Hi @oktayozden
Best option would be to select the last 24 hours instead of working with days.
In my suggestion below, just replace tweets_df with the actual name of your dataframe, and harvested_date with the appropriate variable you have.
Things you may need to check:
- make sure your date format is parsed correctly (you may need to adapt ymd_hms)
- Check if any issue with time zones
- make clear in your UI that you're displaying the last 24 hours
library(tidyverse); library(lubridate)
tweets_df %>%
filter(as.double(difftime(now(), ymd_hms(harvested_date), units = "hours")) < 24)
If you need further help, follow the advice of @williaml and share a reprex with code and some actual data.