iOS Question Displaying Seconds & milli-secs from ticks

james_sgp

Active Member
Licensed User
Longtime User
Hi, I`m converting my B4a app to run on B4i; but it have a problem that B4i doesn`t undetstand the "mod" function I`m using:

B4X:
NumberFormat2(Floor(t/DateTime.TicksPerSecond),1,0,0,False)&"."&NumberFormat2(Floor((t Mod DateTime.TicksPerSecond)/10),2,0,0,False)

Does anyone have a work around?

Thanks in advance.

James
 

Filippo

Expert
Licensed User
Longtime User
Hi, I`m converting my B4a app to run on B4i; but it have a problem that B4i doesn`t undetstand the "mod" function I`m using:

B4X:
NumberFormat2(Floor(t/DateTime.TicksPerSecond),1,0,0,False)&"."&NumberFormat2(Floor((t Mod DateTime.TicksPerSecond)/10),2,0,0,False)

Does anyone have a work around?

Thanks in advance.

James
The equivalent function "Mod" of B4i is: Bit.FMod()
B4X:
NumberFormat2(Floor(t/DateTime.TicksPerSecond),1,0,0,False)&"."&NumberFormat2(Bit.FMod(t/DateTime.TicksPerSecond, 10),2,0,0,False)
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
 
Upvote 0
Top