Hi all, I need to classify time elapsed from a date and give it a classification so it can then lookup into an adjoined table and return a specified value.
At its basic it will look at a date, for e.g.: 01/01/2018 and subtract that from 01/01/2021 and it will return the class '03 Years', which is simple enough. However, i want it to only count full years, so if the first date is 01/04/2018 it will return '02 Years'.
There's a couple of ways i can think to do this, but the strongest i think is:
Method 1:
The Query looks at 01/01/2018 classifies it as 'Full', then looks at the year and subtracts that from 2021, returns '03 Years'
The Query looks at 01/04 /2018 and classifies this as 'Partial' then looks at the year and subtracts that from 2021, but -1 (minus 1), returns '02 Years'
To do this, I need to get it to ignore the year in the first instance. then bring it back in in the second.
Any ideas?
At its basic it will look at a date, for e.g.: 01/01/2018 and subtract that from 01/01/2021 and it will return the class '03 Years', which is simple enough. However, i want it to only count full years, so if the first date is 01/04/2018 it will return '02 Years'.
There's a couple of ways i can think to do this, but the strongest i think is:
Method 1:
The Query looks at 01/01/2018 classifies it as 'Full', then looks at the year and subtracts that from 2021, returns '03 Years'
The Query looks at 01/04 /2018 and classifies this as 'Partial' then looks at the year and subtracts that from 2021, but -1 (minus 1), returns '02 Years'
To do this, I need to get it to ignore the year in the first instance. then bring it back in in the second.
Any ideas?