Forum Stats

  • 3,851,462 Users
  • 2,263,981 Discussions


adding another count to this solution given



  • mathguy
    mathguy Member Posts: 10,670 Blue Diamond

    I don't think I posted any sample data with the context May 3, 8:30 AM until May 31, 4:45 PM.

    Of course you did. Look at the sample row I added, where the dates are given as "pure dates" (no time-of-day), for ID = 5100. The range is from May 3 at 00:00:00 to May 31 at 00:00:00 - meaning the entire day of May 31, except for midnight at the beginning of the day, are not in the range. How does that range include the end-of-month, which is 24 hours after the range ends?

    It's one thing to say that May 31 is the end of month, if you are only looking at "dates" and not at time-of-day. Reasonable people may have different interpretations for that. But if time-of-day also matters, then a range that ends at 00:00:00 on May 31 can't "include" the end-of-month; any interpretation in that sens is not reasonable.

    You added another example yourself, for ID = 6200. There the entire range is within July 1; how does that "include" the end-of-month, which is 30 days later? That doesn't make sense to me, sorry.

    Again, good luck with your project!