If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Seek type:DateTime Problems
I'm using a DateTime field type as a PrimaryKey
(even if PrimaryKey was autonumber and an indexed DateTime field type the problem is the same) When Seeking a DateTime a .NoMatch condition may arise because the datetime is actually stored as a double. If the .NoMatch condition is used to distinquish between .Edit or .Add, a record may be added when edit is desired. Consequently, multiple records in the DB which appear to have the same datetime stamp (display only) when in fact they are slightly different because of the decimal precision. Anyone have a workaround OR whether it is best to store a datetime as a text field (YYYYMMDDHHMMSS Timezone) in Access? |
#2
|
|||
|
|||
Seek type:DateTime Problems
I've had issues with the precision and I just used the format property when
needed to limit the precision, but I'm not sure that it may help you with seeking and using datetime as a primary key. "David" wrote: I'm using a DateTime field type as a PrimaryKey (even if PrimaryKey was autonumber and an indexed DateTime field type the problem is the same) When Seeking a DateTime a .NoMatch condition may arise because the datetime is actually stored as a double. If the .NoMatch condition is used to distinquish between .Edit or .Add, a record may be added when edit is desired. Consequently, multiple records in the DB which appear to have the same datetime stamp (display only) when in fact they are slightly different because of the decimal precision. Anyone have a workaround OR whether it is best to store a datetime as a text field (YYYYMMDDHHMMSS Timezone) in Access? |
#3
|
|||
|
|||
Seek type:DateTime Problems
Thanks for response.
I do not believe formatting first will limit the precision on the value of the actual double that represents the date. Stated differently, how it is displayed (amount of precision) and what the actual value (double) is, are different. "Maarkr" wrote in message ... I've had issues with the precision and I just used the format property when needed to limit the precision, but I'm not sure that it may help you with seeking and using datetime as a primary key. "David" wrote: I'm using a DateTime field type as a PrimaryKey (even if PrimaryKey was autonumber and an indexed DateTime field type the problem is the same) When Seeking a DateTime a .NoMatch condition may arise because the datetime is actually stored as a double. If the .NoMatch condition is used to distinquish between .Edit or .Add, a record may be added when edit is desired. Consequently, multiple records in the DB which appear to have the same datetime stamp (display only) when in fact they are slightly different because of the decimal precision. Anyone have a workaround OR whether it is best to store a datetime as a text field (YYYYMMDDHHMMSS Timezone) in Access? |
Thread Tools | |
Display Modes | |
|
|