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