Home > Net >  Small white for help for two minutes when the end time vary directly and the total number of seconds
Small white for help for two minutes when the end time vary directly and the total number of seconds

Time:09-23

Read the current computer time
Assuming that the current time A 11 01 January 15th minute 01 seconds;
On January 15, 18 B: 08 09 seconds;
04 PM on January 16th C 43 seconds;
Using c # and the AB and AC when the difference between the vehicle and the total number of seconds

CodePudding user response:

It doesn't call programming, is to ask you know have this API,

CodePudding user response:

 var=A DateTime. Now; 
Var B=new DateTime (year: A.Y ear, the month: 1, the day: 15, hour: 11, minute: 01, second: 01, kind: DateTimeKind. Local);
Var C=new DateTime (year: A.Y ear, the month: 1, the day: 16, hour: 04, minute: 35, second: 43, kind: DateTimeKind. Local);

Var AB=A - B;
Var AC=A - C;

Console. WriteLine (" AB: {0}, {1}, Seconds {2} "+ AB. Hours, AB. Minutes, AB. Seconds);
Console. WriteLine (" AB the total number of seconds: {0} ", AB. TotalSeconds);

CodePudding user response:

Baidu c # calculation time

CodePudding user response:

refer to the second floor github_36000833 response:
 var=A DateTime. Now; 
Var B=new DateTime (year: A.Y ear, the month: 1, the day: 15, hour: 11, minute: 01, second: 01, kind: DateTimeKind. Local);
Var C=new DateTime (year: A.Y ear, the month: 1, the day: 16, hour: 04, minute: 35, second: 43, kind: DateTimeKind. Local);

Var AB=A - B;
Var AC=A - C;

Console. WriteLine (" AB: {0}, {1}, Seconds {2} "+ AB. Hours, AB. Minutes, AB. Seconds);
Console. WriteLine (" AB the total number of seconds: {0} ", AB. TotalSeconds);

Detailed so much brother, back to you
  •  Tags:  
  • C #
  • Related