Hey everyone!
I need help making a formula that gives me the date of the next coming Wednesday based on another date in a date field.
So for example if the date field shows 3/4/23, I want the formula to return 5/4/23.
Thanks in advance!
Hey everyone!
I need help making a formula that gives me the date of the next coming Wednesday based on another date in a date field.
So for example if the date field shows 3/4/23, I want the formula to return 5/4/23.
Thanks in advance!
Best answer by AirOps
Makes sense! Thank you for clarifying. Here is a formula that should work:
IF(AND(DATETIME_FORMAT({Date_field_1}, "D")<10, DATETIME_FORMAT({Date_field_2}, "D")<10),
IF(WEEKDAY(DATETIME_PARSE(DATETIME_FORMAT({Date_field_2}, "YYYY-MM-10"),"YYYY-MM-DD"))=3, DATEADD(DATETIME_PARSE(DATETIME_FORMAT({Date_field_2}, "YYYY-MM-10"),"YYYY-MM-DD"),1, "weeks"),
IF(WEEKDAY(DATETIME_PARSE(DATETIME_FORMAT({Date_field_2}, "YYYY-MM-10"),"YYYY-MM-DD"))<3, DATEADD(DATETIME_PARSE(DATETIME_FORMAT({Date_field_2}, "YYYY-MM-10"),"YYYY-MM-DD"),3-WEEKDAY(DATETIME_PARSE(DATETIME_FORMAT({Date_field_2}, "YYYY-MM-10"),"YYYY-MM-DD")),"days"),
IF(WEEKDAY(DATETIME_PARSE(DATETIME_FORMAT({Date_field_2}, "YYYY-MM-10"),"YYYY-MM-DD"))>3, DATEADD(DATETIME_PARSE(DATETIME_FORMAT({Date_field_2}, "YYYY-MM-10"),"YYYY-MM-DD"),10-WEEKDAY(DATETIME_PARSE(DATETIME_FORMAT({Date_field_2}, "YYYY-MM-10"),"YYYY-MM-DD")),"days")))))
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.