From the course: R for Data Science: Lunch Break Lessons

Unlock this course with a free trial

Join today to access over 24,700 courses taught by industry experts.

Excel in R: NETWORKDAYS

Excel in R: NETWORKDAYS

- [Instructor] I'm using spreadsheet functions to illustrate some R programming concepts. This time, let's talk about the Excel function called NETWORKDAYS and I've illustrated it here in a spreadsheet in front of us, you can see in row one, two, and three, I've defined two year month date dates. The first one is March 25th, 2021, the second one is April 10th, 2021. In row six, I've used the formula days and I've simply asked the spreadsheet how many days are there between the first date and the second date, actually between the second date and the first date? In line nine, I've modified that to ask how many work days are there between those two dates? And you can see the difference in cell B6 and cell B9, there are 12 work days even though there are 16 days in all and that's because there are weekends in between those two dates. Now one further note, and I'll get to this in a minute but I want to point it out right now…

Contents