Joe <J_no_spam@_no_spam_Fishinbrain.com> wrote:
I can't seem to get this to work. Everything I try always seems to convert
it to Dec 06 2005.
I tried using DateTimeFormatInfo and setting YearMonth = "MMYY"
and then doing DateTime.Parse(mydate, cultureinfo)
Use DateTime.ParseExact (myDate, "MMMyy", cultureInfo);
where cultureInfo is the relevant culture (or null to use the current
culture). You don't need to change anything in any actual cultures.
The real problem was that your format specifier was wrong though - you
need MMM for text, rather than MM (which would expect 01-12).
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too