Help

Re: Calcuulate date based on weekday

Solved
Jump to Solution
1995 0
cancel
Showing results for 
Search instead for 
Did you mean: 
mushi4ka
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello,

I need to calculate a date. Here is an example:

Start date of employee is 2023-05-03. The previous Monday, an email should be sent to the employee.

How can I calculate the date based on the weekday.

I have a formula, but it only works if employee starts on a Monday


Cheers
1 Solution

Accepted Solutions
mushi4ka
5 - Automation Enthusiast
5 - Automation Enthusiast

We found this as a solution:

dateadd({Start Date}, (-6-WEEKDAY({Start Date})), 'days')

See Solution in Thread

3 Replies 3
mushi4ka
5 - Automation Enthusiast
5 - Automation Enthusiast

This is my formula:

DATETIME_FORMAT(DATEADD({Start Date}, -7, 'days'), 'YYYY-MM-DD')

DATETIME_FORMAT(DATEADD({hire date}, 0 - MOD(DATETIME_DIFF({hire date}, '2022-05-08', 'days'), 7) + 1, 'days'), 'M/D/YYYY')

mushi4ka
5 - Automation Enthusiast
5 - Automation Enthusiast

We found this as a solution:

dateadd({Start Date}, (-6-WEEKDAY({Start Date})), 'days')