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.

Date Add formula, but with specific parameters

Topic Labels: Dates & Timezones Formulas
Solved
Jump to Solution
634 8
cancel
Showing results for 
Search instead for 
Did you mean: 
ler1995
5 - Automation Enthusiast
5 - Automation Enthusiast

Hello!

I am wanting to add a DATEADD formula to my base to set deadlines for different tasks based on a hiring date. I've done this in a previous base, but have since lost access. Can someone help me with the formula I need? 

For reference, some of the formulas I need help with are:

Task: Email for photo, new hire survey, and short bio of new hire (-7 days before Hire Date)

Task: Assign desk space for new hire (-3 days before Hire Date)

Task: Give Uniform (on Hire Date)

Task: Collect how to contact employee while OOO (1 day after Hire Date)

 

This is my current formula:

IF({Task} = "Email for photo, new hire survey, and short bio of new hire", DATEADD({Hire Date}, -7, 'DAYS'))

When I add another {task} = ..... , it changes the format of the first deadline from a date to T00:000:00.OOOZ and then the next task's deadline just shows up as "true." When I reopen the formula, it looks like it changes itself from 

IF({Task} = "Email for photo, new hire survey, and short bio of new hire", DATEADD({Hire Date}-,'DAYS'), {Task} = "Assign desk space for new hire", DATEADD({Hire Date}, -3,'DAYS') to: IF({Task} = "Email for photo, new hire survey, and short bio of new hire", DATEADD({Hire Date},-7,'DAYS'), {Task} = "Assign desk space for new hire").
 
Any help on what I'm doing wrong here?
 
TIA!

 

 

 

 

 

1 Solution

Accepted Solutions
TheTimeSavingCo
18 - Pluto
18 - Pluto

Does this look right?

Screenshot 2025-01-02 at 9.50.45 PM.png 

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')
)

Link to base

See Solution in Thread

8 Replies 8
TheTimeSavingCo
18 - Pluto
18 - Pluto

Does this look right?

Screenshot 2025-01-02 at 9.50.45 PM.png 

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')
)

Link to base

ler1995
5 - Automation Enthusiast
5 - Automation Enthusiast

When I tried your solution, I got a date for the first one, and the others say #ERROR 

 

The "tasks" are the first column for each record in a single line text field. Not sure if that matters!

ler1995
5 - Automation Enthusiast
5 - Automation Enthusiast

Nevermind! Human error got me and I noticed that I hadn't entered the hire date field (face plam)

THANK YOU!!

ler1995
5 - Automation Enthusiast
5 - Automation Enthusiast

I do have one question about this - I noticed that it wasn't calculating correctly. ie it showed that Give Uniform was one day before the hire date, the survey and bio was 8 days before, etc. etc. Why is it off by one day?

Probably a timezone issue?  Try displaying the timezones both in the formula field and the 'Hire Date' field to see if they're different:

Screenshot 2025-01-02 at 10.19.39 PM.png

ler1995
5 - Automation Enthusiast
5 - Automation Enthusiast

Yes, they are different. Thank you! How do I change this so they match?

VikasVimal
6 - Interface Innovator
6 - Interface Innovator

https://chatgpt.com/share/6778f5a9-c2d4-8008-9585-d2f9b170a7c1

Here's some help. And to bookmark for future.

Try toggling 'Use the same time zone for all collaborators' on and selecting the timezone you need!