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 |
oasis1
Starting Member
35 Posts |
Posted - 2013-11-06 : 11:34:38
|
Hi all I am trying to use a datediff to get the age of a patient at a certain time of year. They want to set the persons age as of 06302012. This eems simple enough but I get erroneous dataI use the following datediff(YY, PAT.BIRTH_DATE, '20120630') but even if the person birth day comes after June 30 it returns the age for that year regardless of the date examplebdate02/01/2010 age will equal 208/01/2010 age should be 1 but comes out as 2... mahalo, for your help |
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
|
|
|
|