Hi,
I have a canvas app I am building. I want the user to be able to select a date that they started at an organization from a date picker. Then I want it to automatically calculate the number of whole years/half years that they have been employed.
The formula I currently have works but it only calculates whole years, not the half years as well. Any tips? Below is the formula. DatacardValue11 contains the date the user is selecting, TextInput1 contains today's date.
With({_start: DateValue(DataCardValue11.SelectedDate), _end: TextInput1.Text},
Year(_end) - Year(_start) -1 +
If(DateDiff(Date(Year(2020), Month(_end), Day(_end)), Date(Year(2020), Month(_start), Day(_start)))>0, 0, 1)
)