BruceM said:
I agree that mentioning the serial number
probably added little if anything to the op's understanding.
I don't know what you mean "double float under the covers".
Now that I think about it, I don't know what you mean by 'serial
number'. What I mean is a DATETIME value is persisted in storage
('under the covers') as a numeric in double precision floating point
representation (
http://en.wikipedia.org/wiki/Floating_point). I guess
what you mean by 'serial' is that the integer portion represents the
number of whole days that have elapsed since 1899-12-30 and the decimal
part ultimately represents the number of seconds that have elapsed
since midnight.
I wonder why you assumed I would recommend using Date() + 7 for next weeks
date (rather than DateAdd).
I didn't mean to suggest that you would. I was extrapolating e.g.
revealing that a date is stored as a number may tempt someone to
operate on it using mathematical functions rather than temporal
functions.
Having said that, Date() + 7 seems to work
(probably because 7 is added to the date serial number), although there may
be limitations of which I am unaware.
It makes assumptions about how the data is stored and will continue to
be stored in future releases/different products. I have worked with a
SQL DBMS that stored date/time values as text: I've no idea what <date>
+ 7 would do on that platform...and there's my point. Although not
standard SQL, using DATEADD() is still more implementation-independent
e.g. the storage of date/time could be switched from 'serial number' to
'ticks', 'beats' or whatever but DATEADD() would still be expected to
work because it deals with the temporal data rather than the raw value.
appearance
of the number in the table
I don't know what that means. A table is a more of a 'logical' concept
than something 'physical' that has an appearance. I'm often puzzled
when I read here that "editing should not be done in the table itself"
(I don't mean to suggest that you would say such a thing, though).
I wonder why you chose to comment on <blah>, but not on the
statement <blah blah>
Because 'Me too!' posts as to be discouraged. I'd never get anything
done if I spent my time replying to everything I saw with which I am
broadly in agreement.
I appreciate your taking the time to read and comment.
My pleasure ;-)
Jamie.
--