Question: Is there a way to calculate how old someone is based on today's date and their birthday then display it in following manners:

```
If a user is less than (<) 1 year old THEN show their age in MM & days.
Example:  10 months & 2 days old 

If a user is more than 1 year old AND less than 6 years old THEN show their age in YY & MM & days.
Example:  5 years & 3 months & 10 days old

If a user is more than 6 years old THEN display their age in YY.
Example:  12 years

```

Answer: 
This is basically what you are looking for:

```
DECLARE @date1 DATETIME
     , @date2 DATETIME;

SELECT @date1 = '1/1/2008'
    , @date2 = GETDATE();
SELECT CASE
         WHEN DATEDIFF(YEAR, @date1, @date2) < 1 THEN CAST(DATEDIFF(mm, @date1, @date2) AS VARCHAR)+' Months & '+CAST(DATEDIFF(dd, DATEADD(mm, DATEDIFF(mm, @date1, @date2), @date1), @date2) AS VARCHAR)+' Days'
         WHEN DATEDIFF(YEAR, @date1, @date2) BETWEEN 1 AND 5 THEN CAST(DATEDIFF(mm, @date1, @date2) / 12 AS VARCHAR)+' Years & '+CAST(DATEDIFF(mm, @date1, @date2) % 12 AS VARCHAR)+' Months'
         WHEN DATEDIFF(YEAR, @date1, @date2) >= 6 THEN CAST(DATEDIFF(YEAR, @date1, @date2) AS VARCHAR)+' Years'
      END;

```

Result for when a user is less than (<) 1 year old THEN show their age in MM & days:

[![enter image description here](https://i.stack.imgur.com/NdjcU.png)](https://i.stack.imgur.com/NdjcU.png)

Result for when a user is more than 1 year old AND less than 6 years old THEN show their age in YY & MM & days:

[![enter image description here](https://i.stack.imgur.com/3zYJS.png)](https://i.stack.imgur.com/3zYJS.png)

Result for when a user is more than 6 years old THEN display their age in YY:

[![enter image description here](https://i.stack.imgur.com/5ChCE.png)](https://i.stack.imgur.com/5ChCE.png)
`dc.DayMarker = cast(getdate() as date)`

> 
> DAYmarker is your date field.
> 
> 
>