Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27353

VS 2010 Subtract current track time from total track time

$
0
0
Hey all i have a song playing that displays the time like so:

0:00 / 4:47

The first time is the tracks current time. The second is the total track time of that song playing.

I split it like so:
Code:

Dim tmpTimes As Array = lblSongTime.Text.Split("/")
So tmpTimes(0) gives me 0:00 and tmpTimes(1) gives me 4:47.

Now i tried to subtract the tmpTimes(1) from tmpTimes(0)
Code:

Debug.Print(CDbl(tmpTimes(1).replace(":", "") - tmpTimes(0).replace(":", "")))
and i get: 447.. 446... 445... etc

What kind of calculation do i need in order to return a descending count?

Example: 4:47...4:46.....4:45...etc using the current time tmpTimes(0)?

Viewing all articles
Browse latest Browse all 27353

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>