Time in cell B2 and its accurasy

Please post any questions regarding the program here.

Moderator: 2020vision

Time in cell B2 and its accurasy

Postby alrodopial » Fri May 06, 2011 7:19 pm

With refresh rate of 0.2 sec If I use two consecutive times from cell B2 can their difference give me millisecond accuracy?
Is the time with milliseconds accuracy exists in the B2 time format or do I have to use the VBA "Timer"?
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm

Postby GaryRussell » Fri May 06, 2011 9:18 pm

The time format for cells cannot store milliseconds.

Your best bet is to check elapsed times between worksheet_change events when Target.Columns.Count=16 which is when cell B2 is written.

The Windows API timer function described here is probably the most accurate option.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby alrodopial » Fri May 06, 2011 10:48 pm

Thanks for the answer and the link.
Some thoughts:

Time in cell B2 is actually a number with the delimiter part represent the hours of the day.
So if it is 1 (one) it is equal to 24 hours,equal to 86400 sec so
1 sec = 0.000011574 (1/86400)
If I get two time logs from cell B2 and their diff is 0.000011574 I assume this is 1 sec diff?
If I divide their diff with the 0.000011574 I will get this diff into secs and with accuracy of more than millisecs? Am I doing something wrong?
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm

Postby GaryRussell » Sat May 07, 2011 7:55 am

I would round it to milliseconds. ie. =((B-A)/0.000011574)*1000 where B=current time and A=previous time.

BA itself only records the time up to millisecond accuracy. Why do you want more than millisecond accuracy? Please don't ask me to make BA accurate to more than 1 millisecond because I cannot provide that.
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby GaryRussell » Sat May 07, 2011 8:57 am

1/86400 is actually 0.0000115740740740741

It would be more accurate to use the following formula.
=((B-A)/(1/86400))*1000
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby osknows » Sat May 07, 2011 11:29 am

GaryRussell wrote:The time format for cells cannot store milliseconds.


It's possible to use a custom format in excel to show millisecond accuracy if the cells contains that amount of precision.

Eg Format cell as Custom

'dd/mm/yyyy hh:mm.000'

or just

'hh:mm.000'
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby osknows » Sat May 07, 2011 11:36 am

Ignore what I said. I see your trying to get ms only!
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby GaryRussell » Sat May 07, 2011 11:39 am

Your information is useful though. I have to admit I was wrong :oops:
User avatar
GaryRussell
Site Admin
 
Posts: 9872
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby osknows » Sat May 07, 2011 11:59 am

I made a mistake also, forgot the seconds! Format should be

'dd/mm/yyyy hh:mm:ss.000'

or just

'hh:mm:ss.000'

or even

'ss.000'
User avatar
osknows
 
Posts: 946
Joined: Wed Jul 29, 2009 12:01 am

Postby alrodopial » Sat May 07, 2011 12:59 pm

Thanks guys , two digit precision is enough.
Never wanted more but since English isn't my native language it looks that I wasn't clear enough.
alrodopial
 
Posts: 1384
Joined: Wed Dec 06, 2006 9:59 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 36 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.