We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

[4690] Parse a UK Date String

Last post 08-13-2006 12:25 AM by davidxavier77. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • 01-01-1999 12:00 AM

    [4690] Parse a UK Date String

    This thread is for discussions of Parse a UK Date String.

    • Post Points: 10
  • 08-13-2006 12:25 AM In reply to

    Re: [4690] Parse a UK Date String

    if you want it in a particular Format an easier way to do it is

    DateTime.ParseExact("date time string", format, CultureInfo.currentCulture)

    the Date time string is the string that you want.
    format is the way you want the String to be read dd = day, MM = month, yyyy = four digit year, yy is 2 digit year, HH = 24 Hours clock, hh = 12 hour clock,
    mm = minutes, ss = seconds.
    cultureinfo.currentculture takes on the deault culture you can change it to anything you want.

    the advantage is that it will parse the date and if it finds the date to be invalid it will raise an exception.

    • Post Points: 5
Page 1 of 1 (2 items)