-
Notifications
You must be signed in to change notification settings - Fork 664
Numeral.js
Mathias Rangel Wulff edited this page Jun 13, 2015
·
3 revisions
You can use Numeral.js library to format numbers in AlaSQL expressions:
var data = [{a:120000003.456},{a:567234.12}];
// Pass numeral() function into alasql
alasql.fn.numeral = numeral;
// Use numeral() function
alasql('SELECT numeral(a)->format("0,0") FROM ?',[data]);
See the example in jsFiddle.
© 2014-2024, Andrey Gershun & Mathias Rangel Wulff
Please help improve the documentation by opening a PR on the wiki repo