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
  • 81,083
  • 20
  • 131
  • 150
Pushpendra Kuntal
  • 5,962
  • 20
  • 68
  • 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,526
  • 3
  • 28
  • 42