Pawel Janik <ja***@gazeta.pl> wrote:
I have the following problem. I have date in ddMMyyHHmmss format.
Is there some Parse(String format) method, because i cannot find goot
parameters for DateTime.Parse(....)?
I prefer ParseExact to Parse for this kind of thing - you need
something like:
DateTime x = DateTime.ParseExact
(value, "ddMMyyyy", CultureInfo.InvariantCulture.DateTimeFormat);
Note that which CultureInfo you wish to use will depend on exactly
where you're getting the data from. (Admittedly with the patterns we're
talking about it's unlikely to make much difference as far as I can
see, but with other patterns it would.)
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too