use format_number funtion :-
Converts a number to a string and formats the number according to the locale specified in $_XDOLOCALE and to the number of decimal positions specified in n using Java's default symbols. For example: returns -12 345,00