1

i want to get date difference.

i am using this query:- SELECT DATEDIFF('2012-08-01', '1978-12-06') AS intval ;

but this is returning only number of days. but i want result such like this:-

result:- 33year,2month,12days

please suggest me how can i write such type of query.

Shakti Singh
  • 84,385
  • 21
  • 134
  • 153
Pushpendra Kuntal
  • 6,118
  • 20
  • 69
  • 119

1 Answers1

1

Here is a calculator for date difference

Please refer thie link

How to calculate age in T-SQL with years, months, and days

this is a stackoverflow link

Community
  • 1
  • 1
Pradeep Singh
  • 3,582
  • 3
  • 29
  • 42