CK's Tech Blog
It's Microsoft's World, and I'm just living in it

DateTime.ToString() Patterns

July 17, 2008 06:00 by ckincincy

Many times when programming in .NET you need your DateTime variable to display in various formats:

08/22/2006
Tuesday, 22 August 2006
etc...

This is thankfully made pretty trivial with the ToString() function.  Just pass in the appropriate format string and you will get what you need.

You can find a great list of these here.


Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Comments

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading