Dear Partners in coding,
I want to appreciate all your support and tips you have been giving me so far.
I have this challenge i want to get all the age of my patients under 12 months, i tried using Datediff(mm,DOB,Getdate()) this did not give me the age when i compare with the documented hard copy.
please i will appreciate any fast solution to this issue.
thank you


Esakki MuthuRank #5,293 · 304 reputationPosted Oct 24, 2016, 2:55 AM EDT
Manas MohapatraRank #182 · 13.2K reputationPosted Oct 23, 2016, 11:31 PM EDT
Try like this:
SELECT * FROM tblTemp
WHERE DATEDIFF(month, DOB, GETDATE()) <= 12;
Note: tblTemp is the table name.
Esakki MuthuRank #5,293 · 304 reputationPosted Oct 24, 2016, 1:18 AM EDT
Abraham OlatubosunRank #2,749 · 510 reputationPosted Oct 24, 2016, 1:49 AM EDT
Abraham OlatubosunRank #2,749 · 510 reputationPosted Oct 24, 2016, 3:14 AM EDT