Suppose you have two dates and you are required to get difference in following form
00 years, 00 months and 00 days.
Normally we may get year, month, days etc alone through
datediff(yy/mm/dd, firstDate, secondDate) function. But in this case we are required to get Year, month and days difference is required together.
So get date in above format use following T-SQL script
SELECT '2007-04-25' as [FirstDate], getdate() as [SecondDate], CONVERT(varchar(6),datediff(yy,'2007-04-25',getdate())) + ' Years, '+ CONVERT(varchar(4),datediff(mm, '2007-04-25',getdate())%12)+ ' Months and '+ CONVERT(varchar(4),datediff(dd, '2007-04-25',getdate())%30)+ ' Days' as [RequiredDifference] GO