Its a very newbie type question but i got stuck!!!
i want to find date difference between currdate and DOB field from a table.
Let me know the query please
| SitePoint Sponsor |



Its a very newbie type question but i got stuck!!!
i want to find date difference between currdate and DOB field from a table.
Let me know the query please
http://pritisolanki.blogspot.com/ - Learning Excellence
http://pritisolanki.wordpress.com/ -Sharing Opportunities


the problem with DATEDIFF is that it returns the number of days
i'll bet a doughnut and coffee that priti is looking for age in years, not days
hint: DOB column
![]()



You right !!! i am looking it to make in year not in Day ...in days i was able to find but then i need years .......
let me paste my query
select TO_DAYS(YEAR(curdate()),MONTH(curdate()),DAY(curdate())-TO_DAYS(CONCAT_WS("-",DOBYY,DOBMM,DOBDD)) from table
but it is in days !!
correct this query !!
http://pritisolanki.blogspot.com/ - Learning Excellence
http://pritisolanki.wordpress.com/ -Sharing Opportunities


Bookmarks