Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
ntn104
Posting Yak Master
175 Posts |
Posted - 2008-06-09 : 22:09:37
|
| Hello! Please show me how to calculate how many year of death?I have tb1: fname, lname, date_of_death. Was not sure I can use the below statement. Thanks,Select DATEDIFF(year, date_of_death, getdate()) AS no_of_daysFROM tb1 |
|
|
Vinnie881
Master Smack Fu Yak Hacker
1231 Posts |
Posted - 2008-06-09 : 23:06:53
|
| select datediff(day, '01/01/1999',getdate()) as days select datediff(month, '01/01/1999',getdate()) as months select datediff(year, '01/01/1999',getdate()) as years select datediff(minute, '01/01/1999',getdate()) as minuts |
 |
|
|
|
|
|