Hello,
I need help to convert from bytes to megabytes
use this code:
but I will always return a number in the entire
I need to have a non-integer number such
0.8 Mb or 1.2 Mb
who can help me?
thank you very much
I need help to convert from bytes to megabytes
use this code:
B4X:
Dim TxData_Tmp As Long
Dim RxData_Tmp As Long
Dim TxData As Long
Dim RxData As Long
TxData_Tmp = File.ReadString(File.DirInternal,"tx_bytes")
RxData_Tmp = File.ReadString(File.DirInternal,"rx_bytes")
TxData = (TxData_Tmp/1048576*100000)/100000 'Mbyte
RxData = (RxData_Tmp/1048576*100000)/100000 'Mbye
Label_TxData.Text = "TX Data: " & RxData & " MB"
Label_RxData.Text = "RX Data: " & TxData & " MB"
but I will always return a number in the entire
I need to have a non-integer number such
0.8 Mb or 1.2 Mb
who can help me?
thank you very much