I am using MySQL for my database and working with Spring.
For export functionality, I am generating a report(excel sheet). In that I have a field called "Created On". I am putting the data i get from database into that field which is in DATETIME format.
But what I would like to have in my report need to be like this: '05-22-2016 05:06:55 PM'
Thanks in advance.
select date_format('2016-05-22 17:06:55', '%m-%d-%Y %h:%i:%s %p')