Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community!
I am working with a 'Start Date' value and trying to calculate the 'EtartDate' based on standard working time (Lets set it to 10 for my example)
Here is an example :
Start Date + 10 working days + Weekends = End Date
04-Jul + 10 working days + 4 Days = 17-Jul
Basically, I need something which is the opposite of NetworkDays function,
A function that will convert NetWorkingDays to Total days given the start date and working days.
Any suggestions or examples? Either would be greatly appreciated.
Regards,
Ori
Try the lastworkdate function
From the help file:
lastworkdate(start_date, no_of_workdays {, holiday})
Returns the earliest ending date to achieve number_of_workdays (Monday-Friday) if starting at start_date taking into account any optionally listed holidays. Start_date and holiday should be valid dates or timestamps.
Examples:
lastworkdate ('2007-02-19', 9) returns '2007-03-01'
lastworkdate ('2006-12-18', 8, '2006-12-25', '2006-12-26') returns '2006-12-29'
Try the lastworkdate function
From the help file:
lastworkdate(start_date, no_of_workdays {, holiday})
Returns the earliest ending date to achieve number_of_workdays (Monday-Friday) if starting at start_date taking into account any optionally listed holidays. Start_date and holiday should be valid dates or timestamps.
Examples:
lastworkdate ('2007-02-19', 9) returns '2007-03-01'
lastworkdate ('2006-12-18', 8, '2006-12-25', '2006-12-26') returns '2006-12-29'
Thanks a lot Gysbert, that's exactly what I was looking for.