title: VB date conversion
body: <p>Is there an easy way to convert a string that contains this:</p>
  
  <pre><code>Date: Wed, 5 Nov 2008 13:12:12 -0500 (EST)
  </code></pre>
  
  <p>into a string that contains this:</p>
  
  <pre><code>20081105_131212
  </code></pre>
  
  <p><strong>UPDATE:</strong><br>
  I ended up using date.tryparse which is similar to tryParseExact except you don't have to specify the format string.  I did have to eliminate the () and the EST for this to work.  The date string will always be EST because the date string comes from 1 web server.</p>
  
  <p>Original string: <br></p>
  
  <pre><code>Date: Wed, 5 Nov 2008 13:12:12 -0500 (EST)
  </code></pre>
  
  <p>Using this code: <br></p>
  
  <pre><code>buff1.Remove(0, 6).Replace("(", "").Replace(")", "").Replace("EST", "").Trim()
  </code></pre>
  
  <p>Becomes this string: <br></p>
  
  <pre><code>Wed, 5 Nov 2008 13:12:12 -0500
  </code></pre>
  
  <p>Then I can format appropriately to generate my filename date using this:</p>
  
  <pre><code> If Date.TryParse(buff1, dateValue) Then
     MsgBox(Format(dateValue, "yyyyMMdd_HHmmss"))
   Else
     MsgBox("nope")
   End If
  </code></pre>