User Tools

Site Tools


syntax:functions:workdays

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
syntax:functions:workdays [2019/05/22 22:22] – created dmitrysyntax:functions:workdays [2024/01/20 11:41] (current) – [Remarks] dmitry
Line 1: Line 1:
-===== Workdays(date_as_numberdate_as_number) =====+======Workdays(from_dateto_date) =====
 +Category:  Date and Time function
  
-Returns the number of workdays (i.e. all days except Saturday and Sunday) between two dates. Both date boundaries are inclusive.+\\  
 +=====Description===== 
 +This function returns the number of workdays (i.e. all days except Saturday and Sunday) between //from_date// and //to_date//. Both date boundaries are inclusive. 
 +\\  
 +=====Arguments===== 
 +^Argument^Type^Description^ 
 +|from_date|Date or Number (date serial)|An expression representing the first date value to derive the number of workdays from.| 
 +|to_date|Date or Number (date serial)|An expression representing the second date value to derive the number of workdays from.|
  
-This function is equivalent to the NETWORKDAYS() function in Excel.+**Return value type:** Number 
 + 
 +\\  
 +=====Remarks===== 
 +The //from_date// and //to_date// arguments can take any value or expression that evaluates to a date serial value.  Examples include:   
 +  * A date literal:  #2019-12-12 
 +  * A date serial value: 43811 (the date serial for "2019-12-12"
 +  * A date value created using any of the Date/Time functions that returns a date serial value. 
 + 
 +\\  
 +=====Examples===== 
 + 
 +  workdays(#2020-05-01,#2020-05-20 //Returns 14 
 + 
 +  workdays(#2019-01-01,#2019-12-31)  //Returns 261 (The number of workdays in a non-leap-year year.
 + 
 +  workdays(#2005-12-17, #2005-12-18)  //Returns 0 (The 17th is a Sat and the 18th is a Sun.)
  
-^  Example  ^  Result  ^ Notes ^ 
-| workdays(#2019-05-16, #2019-05-20)  |  2 |1st date is Thursday, 2nd date is Sunday  | 
syntax/functions/workdays.1558578128.txt.gz · Last modified: 2019/05/22 22:22 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki