Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateDiff problem

Status
Not open for further replies.

camaleonCHILE

IS-IT--Management
Jul 7, 2005
20
0
0
hi everybody, I've the next statement:

SELECT DATEDIFF(YY,'1977-11-15',GETDATE())

The difference between the 2 dates, in years, should be 27, but it returns 28.

¿ what's going on ?

Regards
 
<self-advertising>
faq183-5842

#2 explaines why, #10 probably gives results you want/expect.
</self-advertising>

------
"There's a man... He's bald and wears a short-sleeved shirt, and somehow he's very important to me. I think his name is Homer."
(Jack O'Neill, Stargate)
[banghead]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top