String Manipulation and maths
Posted on 2006-11-16
I have a result passed to me as a result of an sql query it is a string.
the string for example would be 03 02:45:00
This represents the duration of a trip.
I need to be able to perform some maths on this string in seperate sections......
I need the first two digits in the string to be *24 then *6 and return a value i then the next 2 digit to be *6 and added to the first value, finally i need the next two digits to be /10 then added to the total, the last two digits are to be ignored.
eg.,..03 02:45:00 would be ((03*24)*6)+(02*6)+(45/10) giving me and end result of 448
Could anyone help me with some pointers for Visual Basic code to do this?