472,122 Members | 1,556 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,122 software developers and data experts.

Store 00:59:00 time in vb6 and access database

228 100+
Hi,

I am working on a small vb6 and access project and I am totally crazy over the way time works!

There are runners and I need to store the time it took each runner to complete the race. If the athlete plays wonderfully, the committee gives him/her a bonas seconds (1-59). Then it arranges the players in order: the one who finishes first (with added seconds, if given any) comes first.

It works very fine for athletes who finish after at least one hour. But if say, the athlete finishes in 00:59:00 seconds, it doesn't work! To avoid access from changing such hours to 12..., I changed the column to text field. So, it does store it as 00:00 but when I do the math from vb 6 using dateformat, it converts it back to 12 and the athlete goes to the last of row.

My english is not good. Hope you understood me.
Oct 2 '10 #1
1 1432
Guido Geurs
767 Expert 512MB
Is it possible to store the hours, minutes and seconds in 3 different feelds and calculate the time for each athlete in seconds ?
like :
ATHLETEtime = (HOURS * 3600) + (MIN * 60 ) + SEC

How do You get Your data from Access ? is it a string like "00:00:00" ?
Then You can still isolate the Hours, minutes and seconds by SPLIT in an array and calculate the seconds for each athlete.
Oct 2 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Stuart | last post: by
2 posts views Thread by Kums | last post: by
3 posts views Thread by Mark Reed | last post: by
6 posts views Thread by Mark Reed | last post: by
2 posts views Thread by Mike Glazer | last post: by
reply views Thread by Ed Bick | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.