Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

Switch function not calculating date add correctly

Topic Labels: Dates & Timezones Formulas
252 1
cancel
Showing results for 
Search instead for 
Did you mean: 
ler1995
5 - Automation Enthusiast
5 - Automation Enthusiast

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
Dimitris_Goudis
10 - Mercury
10 - Mercury

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