Help

Switch function not calculating date add correctly

Topic Labels: Dates & Timezones Formulas
37 1
cancel
Showing results for 
Search instead for 
Did you mean: 
ler1995
4 - Data Explorer
4 - Data Explorer

Hello!

I was recently helped on another post to create parameters for the dateadd function. However, it is not calculating dates correctly. Why? How do I fix this?

Here is my function:

SWITCH(
  Task,
  'Email for photo, new hire survey, and short bio of new hire', DATEADD({Hire Date}, -7, 'days'),
  'Assign desk space for new hire', DATEADD({Hire Date}, -3, 'days'),
  'Give Uniform', {Hire Date},
  'Collect how to contact employee while OOO', DATEADD({Hire Date}, 1, 'days')
)
 

ler1995_1-1735827478365.png

The complete by dates should be: 12/24, 12/31, 12/28, and 1/1

 

1 Reply 1

Hey @ler1995

Please be sure you are using the same timezone in both fields. The issue is on the DateAdd formula, not in Switch. 

Thanks,
Dimitris Goudis