Datetime 12-hour and 24-hour

Source: Internet
Author: User

The 12-hour and 24-hour formats of datetime Parameters

 

1. Do you need to continue reading? Test it first.

We all know that in the 24-hour system, the interval of one day can be expressed as follows:DD-mm-yyyy 00:00:00-dd-mm-yyyy 24:59:59

Questions:

1.1 do "am" and "Noon" belong to morning or afternoon?

1.2 In 12-hour and 24-hour format?

 

2. Introduction to datetime

The display format of datetime type variables in Visual Studio is only related to the system setting format, and cannot be changed. Generally, tostring (string formate) is called to obtain the string format.

 

3. method parameter datetime type

3.1 recently, exchange. WebServices (Microsoft. Exchange. WebServices. dll) was encapsulated to operate emails on the mail server. There is a method:

public EWSMailSearchQuery(string senderAddress, string mailbox, string mailFolderPath, string subjectKeyword, string bodyKeyword, DateTime startDate, DateTime endDate);

3.2 now I have a requirement. I need to find the parameters for all emails received today. They should be as follows:

3.2.1 my system time format:

        

Parameter information:

3.2.2 my system time format is 12-hour:

        

Parameter information:

4. What is the situation?

Maybe you already know the answer and are not misled by life's terms.

You may understand the answer immediately after reading it. What we usually callIt should be called Twelve o'clock P.M. noon, and twelve o'clock A.M. am is actually. (12:00:00 AM = 00:00:00)

Maybe you still don't understand what I want to express. I admit that my presentation skills are really average. Sorry. You can take a look at the answer.

Answer:

      1.3 12:00:00 AM: dd-mm-yyy 00:00:00 AM: dd-mm-yyy

      1.4 12:00:00 noon: PM: dd-mm-yyy 24:59:59 pm: dd-mm-yyy

 

Datetime 12-hour and 24-hour

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.