Aug 02, 2021 09:39 AM
Hi
Does anyone know of a way to ‘Filter’ a ‘Date’ column by something similar to “this week”?
Basically, I’m just trying to create a Grid View that shows - via a Filter - all enquiries that have been received ‘this week’ (which is from Monday through to Sunday of the week I’m looking/accessing the View in).
Any help would be greatly appreciated.
Thank you
Stephen
Solved! Go to Solution.
Aug 03, 2021 06:18 AM
Make sure all of your single quotes are '
(straight) and not ’.
Aug 03, 2021 06:58 AM
Airtable takes Sunday as the 1ste week day. By deducting 1 day of every day, Sunday becomes Saterday in the same week and Monday becomes Sunay in the same week. I’m using this a lot for my (European) clients where the week starts on Monday and end on Sunday.
DATEADD(date, -1, ‘days’), ‘w’)
So if your date is on Sunday, Monday, … or Saturday, it all will fall in the same week.
Give it a test run and if it works for you, you can choose which formula works best for you.
Aug 03, 2021 07:26 AM
@Stephen Another way to approach this is by comparing the week numbers of the relevant dates using the WEEKNUM()
function, which also supports the same “Monday” week-start override. Try this formula:
AND(WEEKNUM(NOW(), "Monday") = WEEKNUM({Enquiry Date/Time}, "Monday"), {Enquiry Date/Time} <= TODAY())
That will output a 1 for any task with a date that’s both on/before today and also in the same calendar week as today. It appears to meet the criteria that you outlined above:
Tomorrow the record dated 8/4 will output a 1, and so on until Sunday. Once Monday hits, that marks the start of a new calendar week, so only next Monday’s tasks will show.
Aug 04, 2021 01:36 AM
Yes, it worked with straight quotes… I have no idea how I even managed to do the other quotes…
Aug 04, 2021 01:37 AM
Thank you. Very helpful explanation.
Aug 04, 2021 01:38 AM
Thanks Justin. There’s now some great solutions in this post. Much appreciated.
Jul 15, 2023 08:43 AM - edited Nov 09, 2023 03:54 PM
Took me a while but if you're looking to label This Week, Next Week, etc from weeks starting Sunday I came up with this. Someone please consolidate in one field.
Weekday -1
Delivery Week (Step 2)
Oct 30, 2023 07:37 AM
Hi
Thanks for this formula. I tried it out Saturday and it was working perfectly. Today, with no changes on my side, it has stopped. Any ideas why that had occurred?