# Date and Time Calculation in Sharepoint Excluding Weekends and displayed in minutes

The code below is working well to calculate the time between two dates and excluding weekends. However, I would like to modify it to just return the number of minutes in number format so I can do some averages on that column.

``````=IF(OR(ISBLANK([Quote Start Time]),ISBLANK([Quote Complete Time])),"",IF(AND((WEEKDAY([Quote Complete Time],2))<(WEEKDAY([Quote Start Time],2)),((WEEKDAY([Quote Start Time],2))-(WEEKDAY([Quote Complete Time],2)))>1),(((DATEDIF([Quote Start Time],[Quote Complete Time],"D")))-(FLOOR((DATEDIF([Quote Start Time],[Quote Complete Time],"D"))/7,1)*2)-2),(((DATEDIF([Quote Start Time],[Quote Complete Time],"D")))-(FLOOR((DATEDIF([Quote Start Time],[Quote Complete Time],"D"))/7,1)*2)))&" days, "&TEXT(MOD([Quote Complete Time]-[Quote Start Time],1),"hh "" hrs,"" mm "" mins"""))
``````

The second answer is working great to show minutes but it is off by one minute. Any ideas on that?

``````=(IF(OR(ISBLANK([Quote Start Time]),ISBLANK([Quote Complete Time])),"",IF(AND((WEEKDAY([Quote Complete Time],2))<(WEEKDAY([Quote Start Time],2)),((WEEKDAY([Quote Start Time],2))-(WEEKDAY([Quote Complete Time],2)))>1),(((DATEDIF([Quote Start Time],[Quote Complete Time],"D")))-(FLOOR((DATEDIF([Quote Start Time],[Quote Complete Time],"D"))/7,1)*2)-2),(((DATEDIF([Quote Start Time],[Quote Complete Time],"D")))-(FLOOR((DATEDIF([Quote Start Time],[Quote Complete Time],"D"))/7,1)*2)))))*1440+INT(MOD([Quote Complete Time]-[Quote Start Time],1)*1440)