# Formula - substract working days from a date

Hi there!

I tried finding answers on this community but couldn’t find any for my specific use case. I have a board where I want to use a combination of Date formulas and automations (based on dependencies) so that I can calculate the start date for a project, giving the fact that I have the Deadline and the working days needed for specific tasks. I am trying to go backwards and calculate the Start Date of that project if I know the deadline and the number of working days for each task.

The issue that I have is that the workdays formula doesn’t recognize negative numbers, it works with adding days, not extracting days from a specific date. And the Substract formula doesn’t do workdays, but calendar days.

@Luiza

One solution is to use something like Integromat to do the calculation. This specific use case can also be made easier by incorporating Google Sheets to do the calculations.

To do this directly in monday formulas is a bit complicated; but “doable”.

The formula below is taken from a video about monday’s undocumented functions. It uses some of the undocumented functions, namely: GTE(), NETWORKDAYS(), INT() and SPLIT().

(You can find out more about some of the undocumented functions here: The monday Hidden Functions – The Monday Man and in this video: monday Formulas - Part 4: The SECRET Functions - YouTube. )

If you don’t care about holidays, you can simplify the formula by replacing the NETWORKDAYS() function with WORKDAYS() and making the necessary adjustments (removing the SPLIT()).

Included in the description of the above video is this formula…
BACKWARD WORKDAYS FORMULA:
(Calculates a new date subtracting WORKDAYS from a given date accounting for holidays.)
To use it…

• set up columns {Date}(date or formula), {Days}(number or formula), {Holidays}(formula}, and another formula column to contain this formula.
• If you want to have different names, set it up this way then after everything is working, change the column names. This formula will automatically change.
• put your holidays in the {Holidays} column in a string with dates in the format YYYY/MM/DD separated by commas, e.g.: “2021/12/24,2021/12/31” (no spaces).
• copy and paste this formula text into your formula column.
``````IF(AND(GTE({Days},0),INT({Days})={Days},{Date}) ,FORMAT_DATE(
SWITCH({Days},
0, {Date},
INT(NETWORKDAYS(FORMAT_DATE({Date},"Y/M/D"),FORMAT_DATE({Date},"Y/M/D"),SPLIT({Holidays},","))), {Date},