The difference between minutes and totalminutes in C #

Source: Internet
Author: User
Today's test to raise a bug, said the message is not the right time to remind, set 2 hours in advance, not yet to remind.

Look at the code.


(M.expectreceivetime-datetime.now). Minutes < (Pmodel.ertdelayprevminutes = = -999? 0:pmodel.ertdelayprevminutes))

Perform


(M.expectreceivetime-datetime.now). Minutes

The result is 55, according to the truth, 170.

Perform


(M.expectreceivetime-datetime.now). Totalminutes

The result is 169.89568451.

Finally, the code is modified to


(Convert.todecimal (M.expectreceivetime-datetime.now). Totalminutes) < (Pmodel.ertdelayprevminutes = = -999? 0:pmodel.ertdelayprevminutes))

Bug resolution

Add:

Days;              Day part Hours; hour part milliseconds;      Millisecond part minutes;           Sub-part seconds;           Second part ticks;             Total Tick totaldays;         Total days totalhours;        The total number of hours totalmilliseconds; Total number of milliseconds totalminutes;      The total number of minutes totalseconds;      Total number of seconds
Related Article

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.