how to change string into date in mysql
how to change string into date in mysql
//how to change string into date in mysql
str_to_date(string_data, format)
Example :
select *,floor(datediff('".date("Y-m-d")."',str_to_date('dob','%d-%m-%Y'))/365) as agediff from tablename
dob = column name and varchar type
//how to change string into date in mysql
str_to_date(string_data, format)
Example :
select *,floor(datediff('".date("Y-m-d")."',str_to_date('dob','%d-%m-%Y'))/365) as agediff from tablename
dob = column name and varchar type
Comments
Post a Comment
If you Satisfied , Please Leave a comment