title: VB convert MM:SS timecode to seconds
body: <p>I am trying to use time span  and total seconds but it can't convert string to long. This is the code I have so far, I am trying to convert a <code>timestamp</code> in the format of HH:MM:SS and MM:SS (stored in a <code>listbox</code>) to total seconds then set the play head / current position (of window media player) to the total seconds of the time stamp. the error i am getting is Conversion from string  to type 'Long' is not valid.</p>
  
  <pre><code>Stamp = "01:22:22" 
  
  Dim SetPos As New TimeSpan(Stamp)'error happens just here (Conversion from string  to type 'Long' is not valid.)
  Dim Seconds As Double = SetPos.TotalSeconds
  
  
  Dim controls As WMPLib.IWMPControls3 = plrVideo.Ctlcontrols
  controls.currentPosition = Seconds 'setting play head to seconds from start
  </code></pre>
  
  <p>Sorry for the terrible code I've only been coding for a little bit.</p>