Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateTime.ParseExact("530", "Hmm"... not working

Status
Not open for further replies.

organicg

Programmer
Oct 21, 2002
151
US
Code:
DateTime dt = DateTime.ParseExact("530", "Hmm", CultureInfo.CurrentCulture);


I can't figure out why this throws a FormatException: String was not recognized as a valid datetime. "0530" works, but "530" will not work eventhough "H" represents "0-24" with no leading zero. Any ideas? Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top