Jump to content

converting date type in SQL


clarkson
 Share

Recommended Posts

I have a table called employee in which there's a field called birth_date. Iwant to get the output in the format of Jan-01-2013.My sql is

$sql="SELECT emp_name,emp_address,salary,DATE_FORMAT(birth_date,'%b,%d,%Y') AS birth_date FROM employee";$query=mysql_query($sql,$connect);

But the query is not succesful. What have I done wrong?Any help to correct this please

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...