Re: Wrong time to datetime conversion using ODBC - who am I to blame?
- From: "Albert D. Kallal" <PleaseNOOOsPAMmkallal@xxxxxxx>
- Date: Tue, 12 Aug 2008 17:58:31 -0600
"Kaj Julius" <no.spam.julius@xxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:u7GxYIZ%23IHA.5040@xxxxxxxxxxxxxxxxxxxxxxx
If I enter a time value in a datetime field in a table, fx. 10:40 it
usually shows as 10:40:00 (default format)
Obviously the driver you are using is not bringing in the date correctly. I
would contact the people who made driver... (the db2 people).
When I then change the format option to Short Date it shows 30-12-1899. So
I guess my Danish version of Access 2003 uses December 30, 1899 as a
starting point. As I read your comment I would have expected it to show
November 30, 1899 - which would then be consistent with the input from the
DB2 time field.
Try displaying the date field a as a double type field data field, what do
you get? In the debug window, go:
debug.Print CDBL(dlookup("MYDate","tblInvoices","id = 6"))
It sounds like your driver is taking the data in wrong (on the other hand,
perhaps the field on the system is formatted as some type of date+time on
the db2 system, but you don't know??
Simply test your values as per above by dispalying the date/time field as a
double. It should shed light on this.
Also, what did the db2 folks say on this matter?
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pleaseNOOSpamKallal@xxxxxxx
.
- Prev by Date: Re: Collecting Data Via Email
- Next by Date: Re: Collecting Data Via Email
- Previous by thread: Import into Access from Excel
- Next by thread: Things to know in import from Excel
- Index(es):
Relevant Pages
|