
|
 |

Format your dates in your SQLYou don't have to use PHP or ASP to format dates you pull from a database. You can format them 'on the fly' in your SQL query using the DATE_FORMAT function. For example, if your column name is ArticleDate, your query could take the form:
SELECT DATE_FORMAT(articledate,'%a %e %b') as artdate FROM Tablename
|
The terms %a, %e and %b translate to the abbreviated day of the week (eg - Wed), the date of the month (1 to 31), and the abbreviated month (eg - Dec). Eg - the final result: "Wed 25 Dec". You can display different dates using different terms - see a full list in the MySQL Manual
|
|