Format Date and Number Fields in MySql
 08 September 2017
 Rodrigo Costa Corrêa

Many times it's necessary to bring formatted information from data base. To do this in MySql it's very easy.

Example of how to format Date and Number (With 2 decimal houses):
SELECT REPLACE(REPLACE(REPLACE(FORMAT(numberField, 2), '.', '@'), ',', '.'), '@', ',') AS numberField,
date_format(dateField,'%d/%m/%Y %H:%i:%s') AS dateField 
FROM test

Result of the select without formatting:

Result of the select with formatting: