User Tools

Site Tools


syntax:functions:agemonths

Differences

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

Link to this comparison view

Next revision
Previous revision
syntax:functions:agemonths [2017/12/23 09:10] – created dmitrysyntax:functions:agemonths [2021/08/30 01:58] (current) – [Arguments] craigt
Line 1: Line 1:
-===== agemonths(number_datenumber_date) =====+====== AgeMonths(date1date2) =====
 +Category:  Date and Time function
  
-Calculates the number of full months between two dates.+\\  
 +=====Description===== 
 +This function returns the number of full months between two dates (//date1// and //date2//).
  
- Example   Result  +\\  
-agemonths(#2015-12-01, #2017-1-31)  |  13 |+=====Arguments===== 
 +^Argument^Type^Description
 +|date1|Date or Number (date serial)|An expression representing a date.  The date to calculate the difference from.| 
 +|date2|Date or Number (date serial)|An expression representing a date.  The date to calculate the difference to.|
  
-See also +**Return value type:** Number (Integer). 
-  * [[syntax:functions:age]]+ 
 +\\  
 +=====Remarks===== 
 +The result is a non-fractional integer, as an absolute value, so the dates can be entered in either order. 
 + 
 +The //date1// and //date2// arguments can take any value or expression that evaluates to a date serial value.  Examples include:   
 +  * A date string:  #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===== 
 + 
 +  agemonths(#1960-05-10, #2021-08-29)  //Returns 735. 
 + 
 +  agemonths(#2021-08-29, #1960-05-10)  //Returns 735.  (Dates are in reversed order from above.) 
 + 
 +  agemonths(#1825-06-15, #2050-06-15)  //Returns 2700. 
 + 
 +\\  
 +=====See also===== 
 +  * [[syntax:functions:age|Age(date1,date2)]]
syntax/functions/agemonths.1514038225.txt.gz · Last modified: 2017/12/23 09:10 by dmitry

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki