|
Posted by Hugo Kornelis on 09/20/06 22:07
On Wed, 20 Sep 2006 07:00:14 +0000 (UTC), Erland Sommarskog wrote:
>I just keep
>looking it and saying to myself "what on earth does that do?".
Hi Erland,
It's actually quite simple. It counts the number of days between a
randomly chosen pivot date and the input date, then counts that number
of days from the pivot date to arrive back at the input date.
A: "Hey, do you know how many days have passed since Jan 1st?"
B: "That would be 263."
A: "Okay. Next question: what date is 263 days after Jan 1st?"
B: "Hey, stupid, that would be today, of course. Sept 21. Couldn't you
just have asked what day it is instead of these silly calculations?"
A: "Could have, but knowing you, you would have told me the time as
well. I wanted just the date."
--
Hugo Kornelis, SQL Server MVP
Navigation:
[Reply to this message]
|