Datetimepickder Custom Date Format C #

Source: Internet
Author: User
Tags month name

Select Format as Cutstom in DateTimePicker, and then write the format string in Cutstomformat

[C #]  Public void Setmycustomformat () {   //  Set the Format type and the CustomFormat string.   Datetimepicker1.format = datetimepickerformat.custom;    " MMMM DD, yyyy-dddd "

Format string Description
D a single-digit or two-digit number of days.
DD Two-digit number of days. A number of days preceded by a zero.
DDD three-character weekday abbreviation.
dddd the full day of the week is called.
One-or two-digit hours in the H12-hour format.
Two-digit hours in the HH12-hour format. One numeric value is preceded by a zero.
One-or two-digit hours in the H24-hour format.
Two-digit hours in the HH24-hour format. One numeric value is preceded by a zero.
M one-digit or two-digit minute value.
MM Two-digit minute value. One numeric value is preceded by a zero.
M one-digit or two-digit month value.
MM Two-digit month value. One numeric value is preceded by a zero.
MMM three-character month abbreviation.
Mmmm the full month name.
s one-digit or two-digit number of seconds.
SS two-digit number of seconds. One numeric value is preceded by a zero.
t the am/pm abbreviation for one letter ("AM" is displayed as "a").
TT two-letter am/pm abbreviation ("AM" is displayed as "AM").
Y one-digit year (2001 is shown as "1").
The last two digits of the YY year (2001 is shown as "01").
YYYY full year (2001 shown as "2001").

Datetimepickder Custom Date Format C #

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.