Is there an easy way to convert a string that contains this:
Date: Wed, 5 Nov 2008 13:12:12 -0500 (EST)
into a string that contains this:
20081105_131212
UPDATE:
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.
Original string:
Date: Wed, 5 Nov 2008 13:12:12 -0500 (EST)
Using this code:
buff1.Remove(0, 6).Replace("(", "").Replace(")", "").Replace("EST", "").Trim()
Becomes this string:
Wed, 5 Nov 2008 13:12:12 -0500
Then I can format appropriatly to generate my filename date using this:
If Date.TryParse(buff1, dateValue) Then
MsgBox(Format(dateValue, "yyyyMMdd_HHmmss"))
Else
MsgBox("nope")
End If
Thanks for the suggestions. SO Rules!