Hello Guys ,
Please i customized a form in info-path from a list in SharePoint and i need to calculate the difference between two dates using date picker fields excluding Saturdays and Sundays, i have very little idea on how to go about it
Ill totally appreciate any help on this ,
Thanks.
Hi,
I wrote a post back in ’08 that shows you how to do this using calculated columns http://www.sharepointoscar.com/2008/06/24/sharepoint-list-calculate…
There are always multiple ways for approaching a given business requirement, this could also be developed using .NET
Hope this helps,
@SharePointOscar
Hello Guys ,
For anyone following the thread
I created two date pickers in SPD named Issued and completed , and then i added a calculated column .. added the formula below to it , set the data type as text only and it worked ,
= ( [Completed] – [Issued] )
– ( ROUNDDOWN( ( [Completed] – [Issued] ) / 7 , 0 ) * 2 )
– ( IF( WEEKDAY( [Issued] ) = 7 , 1 , 0 ) )
– ( IF( WEEKDAY( [Completed] ) = 1 , 1 , 0 ) )
– 1
It calculated the weekdays only and excluded weekends
Thanks
Thanks Oscar,
My requirements are a bit different i think
The users will have to select the start date of the leave and the end date of the leave when they start filling out the form,and i have to display the difference between the end date and the start date in a separate text field,
i used a calculated field that i created in SPD and dragged it unto the form in Info Path, but when i did a preview , it didn’t work , the calculated column was empty , can you please explain what i need to do as regards my requirements?
please any help will be appreciated
Please i have similar issue but mine is i have start date, no of days requested and end date columns in PowerApps and i want the user to select a start date and enter the number of days requested,so that it will automatically display the end date to excluding weekends. please any ideas, will be very much pleased.
What if: 1. The Issued date is 03/06/2017 (Monday) and the Completed date is 03/10/2017 (Friday)? Shouldn’t the output be 4, but the formula output is 3? 2. The Issued date is 03/06/2017 (Monday) and the Completed date is 03/14/2017 (Tuesday). Shouldn’t the output be 6, but the formula output is 5? Thank you!