Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Jan 23, 2023 04:54 PM
Hi AT Community,
I'm new to Airtable and ’m trying to create a formula that would display the Monday of the week / "week of" date for a given date. Monday is the start date of the week.
I've tried formulas from other posts but when I add the formula to my field, it gives an error.
The formulas I've tried are:
DATETIME_FORMAT({Date},‘e’)+1,‘days’),‘M/D’))
--
CONCATENATE("Week of ", DATETIME_FORMAT(DATEADD({Date},-DATETIME_FORMAT({Date},"e"),"days"),"M/D"))
--
DATETIME_FORMAT(IF(WEEKDAY({Date Due})>1,DATEADD({Date Due},-WEEKDAY({Date Due})+1,'days'),IF(WEEKDAY({Date Due})<1,DATEADD({Date Due},-WEEKDAY({Date Due})-6,'days'),{Date Due})),'l')
I really just want to get the Monday of the week when the record is created. So if the record was created on, say, January 19, 2023 - the Monday of that week would be January 16, 2023. And the field would display exactly "January 16, 2023."
Thank you in advance! 🙏
Solved! Go to Solution.
Jan 23, 2023 08:57 PM
Try this:
"Week of " & DATETIME_FORMAT(DATEADD(Date,1-DATETIME_FORMAT(Date,'E'),'day'),'ll')
Jan 23, 2023 08:57 PM
Try this:
"Week of " & DATETIME_FORMAT(DATEADD(Date,1-DATETIME_FORMAT(Date,'E'),'day'),'ll')
Jan 24, 2023 09:07 AM
Thank you so much! Worked like a dream! 🙂
Nov 28, 2023 04:58 AM
No this is old but hoping someone can help...I love this but now when I group by this field it doesn't sort by date but by a,b,c order. is there a workaround for this?
Nov 28, 2023 05:21 AM
I solved for the alphabetical sort by adding WEEKNUM(date) to the beginning of the string, which using this week for example renders as 48 - Week of November 27, 2023.