Filter on Date Column in Excel
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-08-21 12:16 PM
Hi Everyone,
I need your suggestion on applying filter on Date column in Excel sheet.
I used one code stage where we can pass filter criteria but through that I am able to get records of one particular date.
Can you suggest me if I need records of past one week , how can I get through Code.
------------------------------
Krishna Chaitanya Araveti
------------------------------
I need your suggestion on applying filter on Date column in Excel sheet.
I used one code stage where we can pass filter criteria but through that I am able to get records of one particular date.
Can you suggest me if I need records of past one week , how can I get through Code.
------------------------------
Krishna Chaitanya Araveti
------------------------------
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-08-21 02:20 PM
Hi @krishna chaitanya,
Are you using the condition as "[Date] = '08-04-2021'" ?
Try giving the condition with less than and greater than symbol. Please let me know if it doesn't work.
------------------------------
Ritansh Jatwani Senior Consultant
Consultant
EY
Gurgaon
*If you find this post helpful mark it as best answer
------------------------------
Are you using the condition as "[Date] = '08-04-2021'" ?
Try giving the condition with less than and greater than symbol. Please let me know if it doesn't work.
------------------------------
Ritansh Jatwani Senior Consultant
Consultant
EY
Gurgaon
*If you find this post helpful mark it as best answer
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-08-21 02:55 PM
I made a custom filter action in our Excel VBO that does the job
So you can filter Criteria1 AND/OR Criteria2

------------------------------
Johan Michiels
Mr
BGL BNPP Luxembourg
------------------------------
So you can filter Criteria1 AND/OR Criteria2
------------------------------
Johan Michiels
Mr
BGL BNPP Luxembourg
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
04-08-21 02:59 PM
You can simply get whole table into collection and then filter it in bp if it is not that big.
If you are trying to apply autofilter on a date column in excel, then try using this format ">mm/dd/yyyy" - seems to work in macros, likely same in interop calls
Excel also has a special filter criteria xlFilterLastWeek, but that would probably need custom action in excel VBO.
------------------------------
Andrey Kudinov
Project Manager
MobileTelesystems PJSC
Europe/Moscow
------------------------------
If you are trying to apply autofilter on a date column in excel, then try using this format ">mm/dd/yyyy" - seems to work in macros, likely same in interop calls
Excel also has a special filter criteria xlFilterLastWeek, but that would probably need custom action in excel VBO.
------------------------------
Andrey Kudinov
Project Manager
MobileTelesystems PJSC
Europe/Moscow
------------------------------
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
05-08-21 02:16 PM
Hi, Krishna,
yes, this is a challenging one :). It took me couple hours to figure out why date is not working. finally, the main reason is that excel expects you pass DateTime in that filter parameter and not a string. So in your code stage you need to convert string date into DateTime and then it will work.
Regards,
Zdenek
------------------------------
Zdeněk Kabátek
Head of Professional Services
NEOOPS
http://www.neoops.com/
Europe/Prague
------------------------------
yes, this is a challenging one :). It took me couple hours to figure out why date is not working. finally, the main reason is that excel expects you pass DateTime in that filter parameter and not a string. So in your code stage you need to convert string date into DateTime and then it will work.
Regards,
Zdenek
------------------------------
Zdeněk Kabátek
Head of Professional Services
NEOOPS
http://www.neoops.com/
Europe/Prague
------------------------------
