|
Posted by Simon Dean on 10/24/27 11:35
Probably being a little thick here, but when you subtract one date away
from another, how do you convert the resultant value into a number of
days... I guess I could easily / 60 / 60 / 24... but that seems
barbaric... Anything neater?
Cheers
Simon
Ps, Im also just trying to work out how to calculate the number of
mondays and tuesdays etc between two dates... Just thought I'd run this
theory past you if I may to gain more confidence.
I figure getting the date difference, and knowing that the starting date
falls on a Thursday holds the key... working out the days between these
two dates should be easy enough to divide by 7 to get the whole number
and remainder (is that a mod?)... we can just say there's x number of
Wednesdays, x number of Thursdays etc, and then just loop through the
remainder which is a small number so not much of system load?
then we can work out how many of those days were working days, subtract
holiday dates from each count... and... well, that's my thoughts so far...
Workable?
[Back to original message]
|