How to exclude weekends from selected days

rakhi1234
Kilo Contributor

i have date/time field alredy some functionality is running

simply i am ordering one item i want to delivery the item within 10 days (today+10days) i am getting 05/03/2017..it is working fine..here i want to exclude the weekends

and my delivery date is not in weekend

can you please suggest how to proceed this task

6 REPLIES 6

Robbie
Kilo Patron
Kilo Patron

Hi Rakesh,


By leveraging a schedule, the functionality you require is implemented for you.


For example, out of the box and highlighted in my earlier post, there is a schedule called "8-5 Weekdays". This, as the name suggests, will return a date subject to only using week days (Mon-Fri) AND specified business hours of 8-5.


As you haven't specified business hours (although you should consider it moving forward for greater control and accuracy if required), you should take a look at the "Schedules" via the left hand navigation menu (System Scheduler).


You'll see there are a number of Schedules available out of the box. If you don't want to factor in business hours, I would create your own. Usse the 8-5 Weekdays as a basis to copy


Note, that each Schedule has a Schedule Entry - this is where you control the start day and time (Essentially the Monday to Fri and hours).


Once you've configured this new Schedule and Schedule entry, simply grab the sys_id of your new schedule and leverage abhinay   script passing in the sys_id as he's described.



Also please read my earlier post of not only considering your Delivery date field that you created, but also ensuring the system delivery date available out of the box is correct as well - See my above post.



Rakesh - Please can you mark my and abhinay post as helpful if you deem suitable and mark my answer correct if appropriate by clicking on your post link (How to exclude weekends from selected days) to help others with the same question.



Thanks,


Robbie


odinx16
Kilo Contributor

Hi Robbie,

 

I could not find a property with the default values for the fields in the Schedule tab. Do such properties exist, or do you have to configure them by setting a default value in dictionary? (I want to have a default scheduled set, and a different value than 14 hours for Expected time).

 

Thanks,

Nick