mysql date format change code example
Example 1: mysql now format
SELECT DATE_FORMAT(NOW(),'%Y-%m-%d %H-%i-%s')
Example 2: mysql pretty date format
DATE_FORMAT(NOW(),'%M %e, %Y @ %h:%i %p')
#Format is 'June 10, 2014 @ 06:52 PM'
SELECT DATE_FORMAT(NOW(),'%Y-%m-%d %H-%i-%s')
DATE_FORMAT(NOW(),'%M %e, %Y @ %h:%i %p')
#Format is 'June 10, 2014 @ 06:52 PM'