Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
3913 Lượt xem

I have a float field and i can calculate amount within this field. I want that amount should show in round figure. For eg. when price is 64.80 then it updated to 65 and if price 64.40 then it updated to 64. So, what solution i could use?
Thanks in advance.

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

you can use python's round() function

Ảnh đại diện
Huỷ bỏ
Tác giả Câu trả lời hay nhất

Problem solved by just using 'round'. For eg. round(amount).
Thanks.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
2
thg 10 18
6679
0
thg 8 22
2423
1
thg 7 22
20138
0
thg 4 22
3090
3
thg 9 21
3247