Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I want to get the difference between two dates in year and month in my case i want mesure the seniority of salary
x by calcul the diffence between current date and hiring date. i used the function AGE to retourn the diffence.
For exemple: AGE(05/08/2019-05/04/2016) retourn 3 but i want to get 3,4 (years+months).
My question is how i get the diffence between two date in years and months ? thank you in advance.
Hi,
You can try:
Floor( (DateEnd-DateStart) / 365)
+
(
(
(DateEnd-DateStart) / 365) - Floor( (DateEnd-DateStart) / 365)
)
/ (365-12)
)
It's not a beautiful formula, but its exactly giving you the years and months.
Jordy
Climber
Hi,
You can try:
Floor( (DateEnd-DateStart) / 365)
+
(
(
(DateEnd-DateStart) / 365) - Floor( (DateEnd-DateStart) / 365)
)
/ (365-12)
)
It's not a beautiful formula, but its exactly giving you the years and months.
Jordy
Climber
Maybe like this
=Age(MakeDate(2019,08,05),MakeDate(2016,04,05))&','&Mod(Floor((MakeDate(2019,08,05) - MakeDate(2016,04,05))/30.4),12)
maybe like this:
=date(interval(date#('05/08/2019','DD/MM/YYYY')- date#('05/04/2016','DD/MM/YYYY')),'YY-MM')
Thank you