Home > Net >  C # how to calculate the anticipation heavy today how many days?
C # how to calculate the anticipation heavy today how many days?

Time:09-21

How to calculate the anticipation heavy in c # today how many days?

CodePudding user response:

Dong zhong (DateTime. Today -) Days

CodePudding user response:

 
DateTime startDate=new DateTime (2020, 2, 20).
DateTime nowDate=new DateTime (DateTime. Now. Year, DateTime. Now, the Month, DateTime. Now, Day);

Int days=nowDate. Subtract (startDate) days;
  •  Tags:  
  • C#
  • Related