C # How to display the date, day of the week in Chinese format

Source: Internet
Author: User

The statement is displayed in the English format
DateTime.Now.DayOfWeek.ToString ();

Show Chinese format day of the week
"Week" + DateTime.Now.ToString ("ddd",new System.Globalization.CultureInfo ("ZH-CN"));

Display date in Chinese format
DateTime.Now.ToLongDateString (); The display format is "January 1, 2008"
DateTime.Now.ToString ("yyyy mm month DD day"); Display format is "January 01, 2008", note: The letter case in the format string cannot be wrong

Updated simple display Chinese format day of the week with 4 dddd can be done, do not need any piece of pieces
DateTime.Now.ToString ("dddd", New System.Globalization.CultureInfo ("ZH-CN"));

The new way to show the week after VS2005 is
"Week" +datetime.now.dayofweek.tostring (("D"))

C # How to display the date, day of the week in Chinese format

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.