Help

Re: Formula for showing the *next* Saturday

Solved
Jump to Solution
178 1
cancel
Showing results for 
Search instead for 
Did you mean: 
oreocereus
7 - App Architect
7 - App Architect

I generate records through the week that all pertain to an event on Saturday. For organising these records into a week-by-week historical view (and for ease of human use on Saturday), I want to be able to automatically tag all of these records for the Saturday they pertain to.

 

I have searched and tried a few things - this is the formula I got closest with:

IF(WEEKDAY(Created)=6,
DATEADD(Created,0,"days"), 
DATEADD(Created,6+WEEKDAY({Created}),"days"))
 
Where "Created" is the date the record is generated.
 
However, this generates a record for the previous Saturday. I don't really understand the formula I've cobbled together from old threads well enough to understand why.
 
Does anyone have any advice to get it to fill that date as the following saturday from the "date created"?
1 Solution

Accepted Solutions
pressGO_design
10 - Mercury
10 - Mercury

If you create the record on a Saturday, do you want it to show that Saturday or the next one?

DATEADD(Created, 6-WEEKDAY(Created), ‘days’)
^^^if you create it on Saturday 6 April it will show 6 April

IF(
   WEEKDAY(Created)=6,
      DATEADD(Created, 7, ‘days’),
         DATEADD(Created, 6-WEEKDAY(Created), ‘days’)
)
^^^if you create it on 6 April it will show 13 April

See Solution in Thread

2 Replies 2
pressGO_design
10 - Mercury
10 - Mercury

If you create the record on a Saturday, do you want it to show that Saturday or the next one?

DATEADD(Created, 6-WEEKDAY(Created), ‘days’)
^^^if you create it on Saturday 6 April it will show 6 April

IF(
   WEEKDAY(Created)=6,
      DATEADD(Created, 7, ‘days’),
         DATEADD(Created, 6-WEEKDAY(Created), ‘days’)
)
^^^if you create it on 6 April it will show 13 April

 

Thanks! That works 🙂