Let's suppose I have an interval. Say 15 minutes.
I have a start time of 13:57 and an end time of 15:17.
The time when this process runs happens to be 14:07.
I want the result to be 14:00,14:15,14:30,14:45,15:00,15:15 while retaining the year/month/date, etc.
So far, I have these facts down. The minutes modulo the interval is always zero. I need to count down from the current time until I hit the first mod-zero number which is 14:00.
I then simply increase that number by the interval until I reach my ceiling. My real question is how to come up with an elegant, simple way to find this first floor number.
The interval is a timespan and the other two values are datetimes.
Any ideas?