Save the date! Join us on October 16 for our Product Ops launch event. Register here.
Mar 04, 2022 06:17 AM
I thought this would be fairly simple but then it turned out to be a little more complicated, and I’m not sure if this is possible to do without Javascript.
I have a work start date, I know how long the work is going to take (in hours) and I want to calculate an estimated End date. But different days of the week has different shift hours fx. Mon-Thurs has 10 hours shifts, Friday 9 hours and Saturday 5 hours.
Is it possible to calculate an end date, with these informations?
I’ve tried to use play around with WEEKDAY() and DATEADD() but nothing sofar has come close to any solution. Or is this only possible in JavaScript?
Mar 10, 2022 07:59 AM
If the shift hours are fixed (i.e. Thursdays are always 10 hours) then you could theoretically make this work with a very large quantity of nested if statements. Javascript would definitely be easier though as you could loop it and assign variables for each day.
Mar 10, 2022 12:36 PM
Yes I ended up doing a java script and a button, just thought there might have been a simple way using the Airtable script, which I couldn’t see. But stopped after I slipped further and further into the if-statement rabbit hole.