Question: Is it possible to format a date field in a SELECT \* query? I want to get all of the columns from my table but need a different format from the date.

Something like:

```
SELECT *, FORMATDATE(date,'%m-%d-%y') AS date FROM my_table;

```

or do I have to process it in php after the query?

Answer: 
Use [DATE\_FORMAT](http://dev.mysql.com/doc/refman/5.1/en/date-and-time-functions.html#function_date-format):

```
SELECT *, DATE_FORMAT(date, "%m-%d-%y") AS date FROM my_table;

```
you can put name of column in back of date\_format. like this :

```
$rs = mysql_query("select  blablabla,DATE_FORMAT(name_column, '%d-%b-%y | %H:%i')name_column,DATE_FORMAT(name_column2, '%d-%b-%y | %H:%i')as name_column2 from db ORDER BY id DESC limit $offset,$rows");

```

or you can put "as"
yes, you must select one by one. its work !!!!