H2 Time format

Please post any questions regarding the program here.

Moderator: 2020vision

H2 Time format

Postby Michal » Thu Mar 13, 2008 9:54 am

Hi Garry,

Im trying to read the prices with a VB.net program using late binding. I am having problem however getting the time to display properly. What is the format that is being sent to the cell or better still how would I get the value of the cell to show in a vb.net code? Im confused as the cell is showing 0:2:23 yet in the formula bar it shows as 12:02:23 am ?????

any help would be appreciated.

Thank you
Michal
 
Posts: 34
Joined: Sat Mar 08, 2008 11:41 pm
Location: Sydney Australia

Postby Michal » Thu Mar 13, 2008 9:55 am

G2 is the cell I was talking about sorry not h2
Michal
 
Posts: 34
Joined: Sat Mar 08, 2008 11:41 pm
Location: Sydney Australia

Postby Michal » Thu Mar 13, 2008 12:20 pm

Worked it out my self ...... smoke and mirrors

convert to time then separated the individual components of seconds and minute and hours and changed as needed to get it working.

Almost too hard .... who knows if it will even stand up

Michal
Michal
 
Posts: 34
Joined: Sat Mar 08, 2008 11:41 pm
Location: Sydney Australia

Postby Michal » Fri Mar 14, 2008 2:27 am

Nope didnt work ... any sugestions anyone ?
Michal
 
Posts: 34
Joined: Sat Mar 08, 2008 11:41 pm
Location: Sydney Australia

Postby GaryRussell » Fri Mar 14, 2008 12:09 pm

Where xlws is your worksheet object and the time is in cell C2, try the following.

cellTime = Date.FromOADate(xlws.Cells(2,3).Value)
User avatar
GaryRussell
Site Admin
 
Posts: 9871
Joined: Fri Nov 18, 2005 8:09 pm
Location: Birmingham, UK

Postby Michal » Wed Mar 19, 2008 8:02 am

Hi Gary,

Im not sure if your suggestion works, however the solution was so simple its

objSheetsP.Range("D2").Text

the text is the key as it takes the actual formated value of the cell as you see it not as the cell is 'underneeth'

Thanks for your help anyway

Michal
Michal
 
Posts: 34
Joined: Sat Mar 08, 2008 11:41 pm
Location: Sydney Australia


Return to Help

Who is online

Users browsing this forum: No registered users and 63 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.

cron