Caculated column formula for Networkdays between two dates and time in SharePoint Custom List? To get result in [h]:mm

Aravind Narasimhan 1 Reputation point
2021-07-06T12:56:13.683+00:00

I have got this code here to get networkdays in SharePoint Custom List.

Now i want the return type (to be displayed) in [h]:mm

=IF(AND((WEEKDAY(Completed,2))<(WEEKDAY(Issued,2)),((WEEKDAY(Issued,2))-(WEEKDAY(Completed,2)))>1),(((DATEDIF(Issued,Completed,"D")+1))-(FLOOR((DATEDIF(Issued,Completed,"D")+1)/7,1)*2)-2),(((DATEDIF(Issued,Completed,"D")+1))-(FLOOR((DATEDIF(Issued,Completed,"D")+1)/7,1)*2)))

@Mchova01

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Emily Du-MSFT 51,861 Reputation points Microsoft External Staff
    2021-07-07T10:15:32.493+00:00

    @Aravind Narasimhan

    Based on your calculated column, I understand that you want to get workdays between two date and time columns.

    Per my test, you could get the total number of workdays or total hours of workdays. But displaying the calculated result as h:mm is not available.

    For total number of workdays:
    =IF(Completed<Issued,(((DATEDIF(Completed,Issued,"D")))-(FLOOR((DATEDIF(Completed,Issued,"D")+1)/7,1)*2)),(((DATEDIF(Issued,Completed,"D")+1))-(FLOOR((DATEDIF(Issued,Completed,"D")+1)/7,1)*2)))

    For total hours of workdays:
    =(IF(Completed<Issued,(((DATEDIF(Completed,Issued,"D")))-(FLOOR((DATEDIF(Completed,Issued,"D")+1)/7,1)*2)),(((DATEDIF(Issued,Completed,"D")+1))-(FLOOR((DATEDIF(Issued,Completed,"D")+1)/7,1)*2))))*24


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.