0

I have a column StartDate and I want to calculate the time difference in years from that date to the current day. For example:

My start date of work is 4/19/2016, it will be 5 years until 4/19/2022 then it will calculate 6 years. How can I achieve this?

I have tried the following:

Created a Today Date & Time Column, where the default value is Today's Date.

Created a YearsHere Column, that has the following calculated value:

DATEDIF([Start Date],[Today],"Y")

And it returns something like, 108. Say the Start Date is 6/22/2020, the YearsHere column will show 120? Why is that.

UPDATE:

So, the today column is empty. Is there a workaround

Ganesh Sanap - MVP
  • 44,918
  • 21
  • 30
  • 61
BeerusDev
  • 113
  • 1
  • 8
  • 25
  • Hello I am trying to create a calculated column similar to above but with days inbetween. I tried the same formula with "D" instead of "Y" and it give me an answer "the validation formula can refer to this column and not others". do you know why this is? – Aruni Oct 16 '23 at 15:11

1 Answers1

3

Instead of creating a date & time column with Today's date as default value, create a calculated column directly using below formula:

=DATEDIF([Start Date], TODAY(), "Y")

Output:

enter image description here

Documentation: Calculated Field Formulas

Useful thread: How to use Today and Me in Calculated column

Note:

  1. Sometimes comma(,) does not work in formula (I am not sure but it is based on something language or regional settings on your site). So in that case use semicolon(;) instead of comma(,).
Ganesh Sanap - MVP
  • 44,918
  • 21
  • 30
  • 61