How to calculate age from date of birth column in mysql?By Hardik Savani | June 1, 2016 | | 2964 Viewer | Category : MySql
Sometimes, we require to get age from birthdate using mysql select query, we can do it in programming like php,.net and etc framework but if we can do it using mysql query. In bellow example mysql query you can learn how to get age from date field. We can get age value from using mysql DATEDIFF(). So, let's see bellow query.
(DATEDIFF(CURRENT_DATE, STR_TO_DATE(born_date, '%Y-%m-%d'))/365) as age
- Install Sublime Text 3 in Ubuntu 14.04 using Terminal
- AngularJS - How to Limit String Length using Filter?
- How to resolve laravel 5 blank page on server?
- How to get ip address in jquery?
- Laravel 5 Localization(trans helper) tutorial example
- Laravel 5 - line chart example code using google charts API
- AngularJS - scroll to a specific element using anchorscroll
- How to execute mysql query in laravel?