I have the following date format in a MySQL database and was wondering what would be the best method to reformat this date and output what I have in mind.
MySQL: 2012-04-12
Desired Output: Thursday, April 12 2012
Perhaps I could format it in the MySQL query?
Or with Java script?
Could anyone provide a sample of both so I could learn?
You have a lot of ways to do this:
DATE_FORMAThttp://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_date-formatstrtotimeanddate:date('J, M d Y', strtotime($yourdate))new Date()date = moment("2012-04-12", "DDDD, MMMM DD YYYY");.