Joined: 09 Aug 2010
Online Status: Offline
Posts: 53
Topic: Float time Posted: 30 Oct 2013 at 11:28pm
Hi,
Having a little trouble converting float times. I have several times at 0.79 and 2.91 which I would like in real minutes, is there an easy conversion to do this?
Joined: 21 Dec 2007
Online Status: Offline
Posts: 4372
Posted: 06 Nov 2013 at 4:48am
well, what are the times in? Hours?
cint(.79 * 60)
cint(2.91*60)-cint(2.91) * 60
cint(2.91) might return 3, then I think you want to look into truncate() or fix() (if these are available, they just sound 'right' for VB6 syntax) or you could go to the extreme (as it will look silly):
(2.91 - cint(left(totext(2.91), instr(totext(2.91), ".")-1)) * 60 //at least this should be really close
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum