php - Setting date as "january" from mysql query -


this query :

 mysql_query("    select date(date1,'%j %f %y')     nicedate     table1    id='$id'  ") 

this gives me mysql error, how 'nicedate' query 1 january 2011?

select date_format(date1,'%d %m %y') 
  1. date function return date part of date or datetime expression without formating

  2. you need date_format return formatted date string in format desired based on docs


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

sql server - python to mssql encoding problem -

windows - Python Service Installation - "Could not find PythonClass entry" -