Home > Net >  C # a certain time of the effective date
C # a certain time of the effective date

Time:09-22

The 2019-12-12 - day (example: 2019-2-8),
1201 September 11-12-2019-2-13
2201 9-12-13-2019-1-31
3202 and 2020-2-20-2-1
How to calculate the effective number of days?

CodePudding user response:

You need to your definition of "effective" :)

CodePudding user response:

If is to calculate the natural day, two direct new DateTime and then subtracting the line
DateTime d1=new DateTime (2019, 11, 12);
DateTime d2=new DateTime (2019, 2, 13);
Console. WriteLine (" days: {0} ", (d1, d2). TotalDays);
  •  Tags:  
  • C#
  • Related