Want use sql to convert dates?
If you use mysql, there are a lot of good functions to handle dates.
For your question, you could use date_format function.
In your particular case, try this:
select date_format('2001-12-31', '%d %c %Y') as my_format_date;
P.S.
I suppose that the date in the database is stored in the form YYYY-MM-DD.