Define {Harvest Date} as a formula field with the formula DATEADD({Planting Date},{Crop Time},'days')
Set formatting for the field for your desired date format (presumably without a time field.
If you want to enter {Crop Time} in weeks, simply change the unit specifier in the DATEADD() function from 'days' to 'weeks'.
Alternatively, you could create another table, [Crops], that would include (among others) such fields as {Crop Name} and {Crop Time}. You could then use a lookup field to populate {Crop Time} in the DATEADD() function automatically, based on what you planted (possibly with a multiplier based on how early or late in the year {Planting Date} is.
You can set up your formula just as you describe it â as long as you have some sort of start date. From your description it sounds as if you have an assumed or implicit start date of today â that is, as of the day you enter the duration. If so,
Define {Duration} as a number field. (There is an Airtable duration type, but itâs intended to measure shorter intervals, such as the length of an audio, video, or film clip, as it evaluates to elapsed time in seconds.)
Define {Due Date} as a formula field with the formula DATEADD(TODAY(),{Duration},'days')
Set formatting for the field to your preferred style (US, European, ISO, etc.).
As for your second question, unfortunately there is no integral critical path/milestone variable type in Airtable; such interlocks must be defined in code. You can find an example of similar functionality in this post and the base referenced in the reply.
While it does not deal specifically with maintaining a critical path, this thread (and the base referenced in replies) demonstrates related functionality â namely, displaying âgatesâ between product stages.
Finally, this post discusses a method for displaying the ânext actionâ from a prioritized list of actions.
Hey yâall, does anyone know if & how itâs possible to calculate the following Thursday from a given date? For example, if I submit a specific form today or tomorrow, the output would be this coming Thursday, Aug 30 in each case. If I submit on Thursday, Friday, etc. it would then output the following Thursday, Sep 6.
Iâve got this so far: DATEADD({Client Submission Date}, 11, 'days') which calculates 11 days after the submission date. but, as mentioned I need to specify Thursday.
Hey Jeremy, thank you so much! This works perfectly, however Iâm not sure I understand how it works. For example, if we beed to instead calculate 2 Thursdays from {Client Submission Date}, I would expect that simply changing 7 to 14, 6 to 13, 5 to 12 should do it? But this change doesnât seem to have any effect on the output.
The WEEKDAY() function returns the number of the day of the week for the date you pass it. If you pass it a date that falls on a Sunday, it returns 0, if you pass it a date that falls on a Saturday, it returns 6 - Iâm sure you can fill in the blanks.
So to get the 2nd Thursday from a date, you have to add a number of days that gets you to the 4th day of the week (day that returns 4 in the WEEKDAY() function), and is also at least 8 days away.
In the formula I sent you above, I am saying:
When the day# = 4 (ie, it is a Thursday), add 7 days to get my new date
When the day# is 5 (Friday), add 6 daysâŚ
When the day# is 6 (Saturday), add 5 daysâŚ
When the day# is anything else (ie, anything less than 4), just subtract the day number from 4 to get the number of days until Thursday and add that many days⌠(Sunday = day#0; 4-0 = 4; adding 4 days to the 0th day gets you the 4th day, which is Thursday⌠and so on for Monday, Tuesday, and Wednesday).
Hopefully that helps you understand whatâs going on there. Iâm going to leave it at that for you, and let you try to figure out how to make your new formula for finding the 2nd Thursday - but if you still canât figure it out and need help, feel free to post back.
(Also, you are totally on the right track with the changes you proposed â there is just one more change you need to make in addition to them to make any days Sunday-Wednesday work).
Thanks man!! I got it to find the next Monday that is at least 5 days away:
DATEADD({Writer's Due Date},
IF(WEEKDAY({Writer's Due Date})=1, 14,
IF(WEEKDAY({Writer's Due Date})=2, 13,
IF(WEEKDAY({Writer's Due Date})=3, 12,
IF(WEEKDAY({Writer's Due Date})=4, 11,
IF(WEEKDAY({Writer's Due Date})=5, 10,
IF(WEEKDAY({Writer's Due Date})=6, 9,
IF(WEEKDAY({Writer's Due Date})=7, 8,
8-WEEKDAY({Writer's Due Date})
))))))),'days')
has this been more simplified? I have many projects I would like to use this formula on but the holidays and weekends will always be different? unless I add every single weekend date which would be a forever list�