Documentation errors (1 Viewer)

Pat Hartman

Super Moderator
Staff member
Local time
Today, 13:21
Joined
Feb 19, 2002
Messages
43,213
I've been trying for quite some time to locate the actual date range for a date data type for Jet or ACE. I keep getting the SQL Server range, even from websites that claim to be describing Jet and ACE and I finally drilled down in the MS website to this:

Microsoft Access Data Types - Open Database Connectivity (ODBC) | Microsoft Docs

I posted a comment regarding the fact that the Access Date data type is NOT equivalent to SQL's TimeStamp then I found another error but can't post again. Later on the document said that the 0 value for a date = 12/31/1899 and that is WRONG also. There are other questionable things.

No wonder newbees can't find anything useful like an actual language manual for VBA on the MS web site.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 01:21
Joined
May 7, 2009
Messages
19,231
it's Dec 30 not Dec 31.

?CDbl(#12/30/1899#)
0

According to a famous book:
Perhaps it seems odd that the 0 date, to VBA, is 12/30/1899. This means that day
1 is 12/31/1899, and day 2 is 1/1/1900. Why the odd numbering? The story we
heard (and this may be totally apocryphal, so don’t hold us to this) is that some
other company—to remain unnamed—released an extremely popular
spreadsheet product before Microsoft’s first spreadsheet. This other spreadsheet
stored dates in the same fashion as described here, and Microsoft wanted to
provide a compatible date format. The other company had designated 12/31/
1899 as day 0, and 1/1/1900 as day 1. Unfortunately, the other company had
neglected to notice that 1900 wasn’t a leap year. (See the section titled “Is This a
Leap Year?” later in the chapter for more information on why 1900 wasn’t a leap
year.) Microsoft developers, working on their first spreadsheet, worked to find a
way so that their dates, correctly taking into account the fact that 1900 wasn’t a
leap year, could coincide with the dates used by their competitor. Their solution?
Back up the 0 date one day, so that only the days before March 1, 1900 would be
different from the competitors’. Maybe it’s true; maybe it’s not. It makes a good
story.
 
Last edited:

sonic8

AWF VIP
Local time
Today, 19:21
Joined
Oct 27, 2015
Messages
998
I posted a comment regarding the fact that the Access Date data type is NOT equivalent to SQL's TimeStamp then I found another error but can't post again. Later on the document said that the 0 value for a date = 12/31/1899 and that is WRONG also. There are other questionable things.
Instead of posting comments, you can also just fix the error and submit a pull request. - In my experience changes submitted in pull requests are reviewed and usually accepted (if correct and sensible) within a couple of days.
I just submitted the fix to the 0-day date error you pointed out.
I left the SQL_TIMESTAMP issue alone, as there were several changes in different versions of the ODBC standards and I'm not going to touch this without thorough research, which I don't have time for right now.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 13:21
Joined
Feb 19, 2002
Messages
43,213
Thank you arnelgp. I only pointed out that the date in the documentation was wrong. I didn't mention what it should be.
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 13:21
Joined
Feb 19, 2002
Messages
43,213
@sonic8 Thanks, I didn't realize I could do that. Could you explain the method in more detail please so i do it correctly? Thanks:)
 

Users who are viewing this thread

Top Bottom