C#/.NET Little Wonders: The DateTime TryParsae() and ParseExact() Meth(blackrabbitcoder.net)

submitted by BlackRabbitCoderBlackRabbitCoder(661) 4 months, 20 days ago

A while back I talked about some goodies in DateTime, mostly the properties that let you split out just the date or time. This week, I wanted to look at a couple more methods of the DateTime struct that give you additional control over parsing an input string into a DateTime. Most of us have dealt with using DateTime.Parse() for these tasks, but sometimes you are wanting to parse something that may not be a valid DateTime, or may be in a non-standard format. So let’s look at the TryParse() and ParseExact() methods that can be used to deal with these two situations.

1 comment |category: |Views: 7

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by BlackRabbitCoderBlackRabbitCoder(661) 4 months, 20 days ago 0

new post

Reply

information Login or create an account to comment on this story