You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/04/28 13:03:44 UTC
[GitHub] [incubator-doris] kangkaisen opened a new issue #1063: Add a
money_format function
kangkaisen opened a new issue #1063: Add a money_format function
URL: https://github.com/apache/incubator-doris/issues/1063
Add a money_format function:
```
mysql> select money_format(1123.456);
+------------------------+
| money_format(1123.456) |
+------------------------+
| 1,123.46 |
+------------------------+
1 row in set (0.04 sec)
mysql> select money_format(1123.45);
+-----------------------+
| money_format(1123.45) |
+-----------------------+
| 1,123.45 |
+-----------------------+
1 row in set (0.04 sec)
mysql> select money_format(1123.4);
+----------------------+
| money_format(1123.4) |
+----------------------+
| 1,123.40 |
+----------------------+
1 row in set (0.03 sec)
mysql> select money_format(11238888);
+------------------------+
| money_format(11238888) |
+------------------------+
| 11,238,888.00 |
+------------------------+
1 row in set (0.04 sec)
```
like PHP money_format function: https://php.net/manual/en/function.money-format.php
like Java `DecimalFormat df = new DecimalFormat(",###.##")`;
like Mysql https://dev.mysql.com/doc/refman/5.5/en/string-functions.html#function_format
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
For additional commands, e-mail: dev-help@doris.apache.org