how to add working days to currentDate

0
Hello Mendixer,   any advices how to add working days to current Date? is there maybe any Widget like communitycommons just for dates? Datepicker i use : Mendix Marketplace - React DateTimePicker   The Usecase: ProjectManager asks you how long you will need for the Task. Your answer is : Min 2 day and max 5 days. Now, i set in a Datepicker the MinTime and MaxTime like in the picture below.      Seems to be all fine, in a microflow i set the Attribute MaxTurnaroundTime ( addDays[%currentDateTime$], $Answer1) and Attribute MinTurnaroundTime (addDays[%currentDateTime$], $Answer2).   The Problem: The addDays funktion should skip the Weekends. It should add only working days.   any advices? I think this should be not a big Problem but i dont found a solution. :-)   Best regards       
asked
1 answers
2

Hi,

 

You can achieve this by adding datetime functions  formatDateTime($Date,"EEE").

If it returns  'Sun' or 'Sat' you need to add another day till it is not  a weekend . You have to build the logic in microflow accordingly.

 

Second solution : You can also use this widget  https://marketplace.mendix.com/link/component/110117

to get working days .

Thanks

answered