I have a table that shows orders that are shipping out for any particular day. I was asked to add a column that would display the number of days between the product build date and ship date. This was easy enough using the code in the value box of the added column:
Unfortunately, I forgot that # of days needs to exclude Fridays, Saturdays and Sundays. Is there something different I can use in the value box to achieve this or is it more involved then that?
For example, if the start date is 22-08-2025 and the end date is 30-09-2025, the total difference (excluding Fridays, Saturdays, and Sundays) will be 22 days.
Thanks for the response. I attempted to use this code with a slight variation. I needed it to use the correct start date and end date for each record, so this is what I used:
A mock JSON response just means an example of how your currentSourceRow data looks. If youβre comfortable, you can share the actual currentSourceRow object so we can see the structure.
If it contains sensitive or personal data, no worries β you can instead create a sample JSON that mimics the same structure (same keys, but with dummy values). That will be just as helpful for understanding the issue.
Hi tomm, just checking in. I tested your code snippet above for calculating the days between each date and it looks like it should work. With this function you would get 0 days if the ship_date is after the build_date however, so it would be worth trying to swap the two and see if that fixes it.