Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
3916 มุมมอง

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.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

you can use python's round() function

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
2
ต.ค. 18
6716
0
ส.ค. 22
2427
1
ก.ค. 22
20151
0
เม.ย. 22
3095
3
ก.ย. 21
3256