Get years from date column
-
19-02-2021 - |
Domanda
I have a column HireDate, a date column, and I would like to have a Seniority column number of years depending of Today's Date - Hire Date.
Any help please?
Altri suggerimenti
In addition to the first answer: if you want to round the numeric value down toward zero, use FLOOR function instead.
For example, 5.27 will be calculated as 5.2 instead of 5.3; 1.7 will be calculated as 1 instead of 2.
For integer:
=IF(NOT(ISBLANK([HireDate])),FLOOR((TODAY()-[HireDate])/365,1),"")
For decimal:
=IF(NOT(ISBLANK([HireDate])),FLOOR((TODAY()-[HireDate])/365,0.1),"")
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange