Jump to content

converting date type in SQL


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 post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...