Skip to content

Commit 2fe5e87

Browse files
authored
Fixed mapped date for zero day date in Microsoft Access
The correct date for 0 in Microsoft Access is 1899-12-30.
1 parent 72fd023 commit 2fe5e87

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/odbc/microsoft/microsoft-access-data-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ The following table shows the Microsoft Access data types, data types used to cr
6060
|BINARY, VARBINARY, and VARCHAR|Creating a BINARY, VARBINARY, or VARCHAR column of zero or unspecified length actually returns a 510-byte column.|
6161
|BYTE|Even though a Microsoft Access NUMBER field with a FieldSize equal to BYTE is unsigned, a negative number can be inserted into the field when using the Microsoft Access driver.|
6262
|CHAR, LONGVARCHAR, and VARCHAR|A character string literal can contain any ANSI character (1-255 decimal). Use two consecutive single quotation marks ('') to represent one single quotation mark (').<br /><br /> Procedures should be used to pass character data when using any special character in a character data type column.|
63-
|DATE|Date values must be either delimited according to the ODBC canonical date format or delimited by the datetime delimiter ("#"). Otherwise, Microsoft Access will treat the value as an arithmetic expression and will not raise a warning or error.<br /><br /> For example, the date "March 5, 1996" must be represented as {d '1996-03-05'} or #03/05/1996#; otherwise, if only 03/05/1993 is submitted, Microsoft Access will evaluate this as 3 divided by 5 divided by 1996. This value rounds up to the integer 0, and since the zero day maps to 1899-12-31, this is the date used.<br /><br /> A pipe character (&#124;) cannot be used in a date value, even if enclosed in back quotes.|
63+
|DATE|Date values must be either delimited according to the ODBC canonical date format or delimited by the datetime delimiter ("#"). Otherwise, Microsoft Access will treat the value as an arithmetic expression and will not raise a warning or error.<br /><br /> For example, the date "March 5, 1996" must be represented as {d '1996-03-05'} or #03/05/1996#; otherwise, if only 03/05/1993 is submitted, Microsoft Access will evaluate this as 3 divided by 5 divided by 1996. This value rounds up to the integer 0, and since the zero day maps to 1899-12-30, this is the date used.<br /><br /> A pipe character (&#124;) cannot be used in a date value, even if enclosed in back quotes.|
6464
|GUID|Data type limited to Microsoft Access 4.0.|
6565
|NUMERIC|Data type limited to Microsoft Access 4.0.|
6666

0 commit comments

Comments
 (0)