Ok,
Task: Calculate number of days from 'today' to 6/6/2012
What I do is roughly:
(DateTime.DateParse("06/06/2012")-datetime.now)/datetime.ticksperday
That is 336
However in the calculation in my spreadsheet its 337
And this site also says 337 (without including the last day)
If I take the calculation up there, and remove the datetime.now and instead use a dateparse to parse the date from today i get 337 as well.
So is it because there is hour/minute information in datetime.now and should be removed somehow?
Task: Calculate number of days from 'today' to 6/6/2012
What I do is roughly:
(DateTime.DateParse("06/06/2012")-datetime.now)/datetime.ticksperday
That is 336
However in the calculation in my spreadsheet its 337
And this site also says 337 (without including the last day)
If I take the calculation up there, and remove the datetime.now and instead use a dateparse to parse the date from today i get 337 as well.
So is it because there is hour/minute information in datetime.now and should be removed somehow?
Last edited: