Here is a sql method partially done for you
declare @demo table ([data] varchar(50));
insert into @demo ([data]) values
('2.04 Years'),
('0.06'),
('2 Years'),
('0'),
('0.5 years');
;with cte as
(
select
cast(REPLACE([data], ' years','') as float) as Transformed
from @demo
)
select
cast(Transformed as int) as [Years]
,'substract the years from the float as input to months calculation' as [Months]
from cte;
Note I have not done the months calculation for you but have included a hint as how to do it.
If nothing else this demonstrates OriginalGriff's points - handling dates in this way is ugly, prone to issues (see my comment about case sensitivity) and horribly non-performant
This appears to be elapsed time that you are trying to store rather than a "Date", so you might want to consider using a float instead - the sql is much simpler
declare @demo2 table ([data] float);
insert into @demo2 ([data]) values
(2.04),
(0.06),
(2),
(0),
(0.5);
select
cast([data] as int) as [Years]
,'substract the years from [data] as input to months calculation' as [Months]
from @demo2
Again - I have left the calculation of the months as an exercise for you.
By far the best approach would be to store the start datetime and the end datetime and calculate the difference when you need it - preferably in the UI layer