#1,036 – Date Formats in the DatePicker Control

You can set the format of the date displayed in the text area of a DatePicker by setting the SelectedDateFormat property to either Short or Long.  These formats correspond to the “short date” and “long date” formats associated with the current culture.  You can see these format strings in the Region dialog.  For example, for English/U.S. they are:

  • Short – “M/d/yyyy” 
  • Long – “dddd, MMMM d, yyyy” 

Where

  • M = Month, 1-12
  • d = Day of month, 1-31
  • yyyy = 4-digit year
  • dddd = Day of week, full name
  • MMMM = Month, full name

1036-001

So, for English/U.S., if we select March 18, 2014 as the date, we see the date displayed as one of the following strings:

  • Short – “3/18/2014”
  • Long – “Tuesday, March 18, 2014”

1036-002

 

 

 

About Sean
Software developer in the Twin Cities area, passionate about .NET technologies. Equally passionate about my own personal projects related to family history and preservation of family stories and photos.

One Response to #1,036 – Date Formats in the DatePicker Control

  1. Pingback: Dew Drop – March 25, 2014 (#1750) | Morning Dew

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: