Keep 2 digits after the decimal point. #714
-
I use this code to list all files in the current directory, and the file size I want to be in KB, so I divided by 1024, but the result is too many digits after the decimal point.
So I want to keep only 2 digits after the decimal point.I found this command in the user guide, but I don’t know how to add it to the original code correctly.
Hope someone can give me some pointers, thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
That is a Dataview Query Language function, but you can call it from Javascript as |
Beta Was this translation helpful? Give feedback.
-
@blacksmithgu Thank you so much. |
Beta Was this translation helpful? Give feedback.
That is a Dataview Query Language function, but you can call it from Javascript as
dv.func.round(number, 2)
.