Hope this helps someone in the future.
Often times when scheduling things, you need to work out the next business day. Here is a simple solution that does that.
Logic goes:
- If it is the weekend, set it to Monday
- If it is before 9am - set it to today, 9am
- If it is after 5pm - set it to tomorrow 9am
- Otherwise return now
{{
if(parseNumber(formatDate(now; “E”; “Pacific/Auckland”)) >= 6;
addDays(parseDate(formatDate(now; “yyyy-MM-DD”; “Pacific/Auckland”) & " 09:00"; “yyyy-MM-DD HH:mm”; “Pacific/Auckland”); 8 - parseNumber(formatDate(now; “E”; “Pacific/Auckland”)));
if(parseNumber(formatDate(now; "H"; "Pacific/Auckland")) < 9; parseDate(formatDate(now; "yyyy-MM-DD"; "Pacific/Auckland") & " 09:00"; "yyyy-MM-DD HH:mm"; "Pacific/Auckland");
if(parseNumber(formatDate(now; "H"; "Pacific/Auckland")) >= 17; addDays(parseDate(formatDate(now; "yyyy-MM-DD"; "Pacific/Auckland") & " 09:00"; "yyyy-MM-DD HH:mm"; "Pacific/Auckland");
if(parseNumber(formatDate(now; "E"; "Pacific/Auckland")) = 5; 3; 1));
parseDate(formatDate(now; "yyyy-MM-DD HH:mm"; "Pacific/Auckland"); "yyyy-MM-DD HH:mm"; "Pacific/Auckland")
)
)
)
}}

