This could be done using custom code such as below - I've assumed the values you're using are people's ages, and you're trying to work out their date of birth given their age today.
You can see the below code in action here: http://sqlfiddle.com/#!3/c757c/2
create function dbo.AgeToDOB(@age nvarchar(32))
returns datetime
as
begin
declare @pointer int = 0
, @pointerPrev int = 1
, @y nvarchar(6)
, @m nvarchar(6)
, @w nvarchar(6)
, @d nvarchar(6)
, @result datetime = getutcdate() --set this to the date we're working to/from
--convert various ways of expressing units to a standard
set @age = REPLACE(@age,'Years','Y')
set @age = REPLACE(@age,'Year','Y')
set @age = REPLACE(@age,'Months','M')
set @age = REPLACE(@age,'Month','M')
set @age = REPLACE(@age,'Weeks','W')
set @age = REPLACE(@age,'Week','W')
set @age = REPLACE(@age,'Days','D')
set @age = REPLACE(@age,'Day','D')
set @pointer = isnull(nullif(CHARINDEX('Y',@age),0),@pointer)
set @y = case when @pointer > @pointerprev then SUBSTRING(@age,@pointerprev,@pointer - @pointerprev) else null end
set @pointerPrev = @pointer + 1
set @pointer = isnull(nullif(CHARINDEX('M',@age),0),@pointer)
set @m = case when @pointer > @pointerprev then SUBSTRING(@age,@pointerprev,@pointer - @pointerprev) else null end
set @pointerPrev = @pointer + 1
set @pointer = isnull(nullif(CHARINDEX('W',@age),0),@pointer)
set @w = case when @pointer > @pointerprev then SUBSTRING(@age,@pointerprev,@pointer - @pointerprev) else null end
set @pointerPrev = @pointer + 1
set @pointer = isnull(nullif(CHARINDEX('D',@age),0),@pointer)
set @d = case when @pointer > @pointerprev then SUBSTRING(@age,@pointerprev,@pointer - @pointerprev) else null end
set @result = dateadd(YEAR, 0 - isnull(cast(@y as int),0), @result)
set @result = dateadd(MONTH, 0 - isnull(cast(@m as int),0), @result)
set @result = dateadd(Week, 0 - isnull(cast(@w as int),0), @result)
set @result = dateadd(Day, 0 - isnull(cast(@d as int),0), @result)
return @result
end
go
select dbo.AgeToDOB( '20 Years 8 Months 3 Weeks')
NB: there's a lot of scope for optimisation here; I've left it simple above to help keep it clear what's going on.
61 Years 8 Months 4 Weeksexpect to be asdatetime? It is not even clear how many days a year or a month has. What is the "zero-time" at all? Should the timespan be subtracted from or added to thisdatetime?