number/string in scientific notation

dougc

Member
Licensed User
Longtime User
the below code snippit is returning a string (which is really a number, I made it a string so I could parse it) in scientific notation

totalHours = 25920

B4X:
totalHours = totalDays * 24
   totalMinutes = totalHours * 60
   totalseconds = totalMinutes * 60
   Log("totalseconds (1) = " & totalSeconds)

below is my log

totalseconds (1) = 9.3312E7

is there any way to get the number/string back not in scientific notation? While it is a big number it only has 8 digits.

thanks

dougc
 

Mahares

Expert
Licensed User
Longtime User
You can use either:
B4X:
Msgbox("totalseconds (1) = " & NumberFormat(9.3312E7,1,0),"")
 Msgbox("totalseconds (1) = " & NumberFormat2(9.3312E7,1,0,0,False),"")
 
Upvote 0
Top