Hi,
I have Month till date excel data, how to select yesterdays date every time. Reference data is below.
let me know If there is any formula from which I get yesterday's data automatically?
Input | |||
Datetime | Name | Cost | State |
13-11-2024 18:09:09 | Rohan | 1213 | Rajesthan |
15-11-2024 14:44:20 | Anil | 343 | Viman |
13-11-2024 17:00:53 | Vasi | 1223 | Pune |
13-11-2024 13:51:01 | Shah | 5656 | Kharadi |
13-11-2024 17:10:37 | Prash | 9890 | Koregaon |
13-11-2024 17:16:19 | Shub | 45435 | Camp |
13-11-2024 17:24:19 | Mayu | 34 | Nigdi |
14-11-2024 17:46:42 | Nehu | 434 | Pune |
15-11-2024 09:57:06 | Anil | 4645 | Kharadi |
15-11-2024 09:05:10 | Vasi | 6536 | Rajesthan |
15-11-2024 09:36:18 | Shah | 6764 | Viman |
14-11-2024 14:10:24 | Prash | 4563 | Camp |
14-11-2024 13:03:04 | Prash | 345 | Nigdi |
14-11-2024 16:53:00 | Vasi | 9976 | Pune |
Output | |||
Datetime | Name | Cost | State |
14-11-2024 14:10:24 | Prash | 4563 | Camp |
14-11-2024 13:03:04 | Prash | 345 | Nigdi |
14-11-2024 16:53:00 | Vasi | 9976 | Pune |
14-11-2024 17:46:42 | Nehu | 434 | Pune |
Solved! Go to Solution.
Use this formula to create a new string field - DateTimeFormat(DateTimeAdd(DateTimeParse([Date], "%d-%m-%Y %H:%M:%S"), -1, 'days'), "%d-%m-%Y %H:%M:%S")
I think this will work and you can call your fields whatever you want or you can override the incoming date field. I wanted to show you the progression.
First you will need to convert you date/time field into the ISO date format. You can either use the DateTime tool or a formula. Then in your filter the formula to find yesterday dynamically would be: DateTimeAdd(DateTimeNow(),-1,'days')
https://help.alteryx.com/current/en/designer/functions/datetime-functions.html
Hi, @shahnawaz_khan
Custom filter :
DateTimeFormat(DateTimeParse([Datetime],'%d/%m/%Y %H:%M:%S'),'%Y-%m-%d') = DateTimeFormat(DateTimeAdd(DateTimeToday(), -1,'day'),'%Y-%m-%d')