ADO with Access Date/Time field not storing the time, just the date 
Author Message
 ADO with Access Date/Time field not storing the time, just the date

Hi,

I'm using VB 6 and ADO to add records to a table. The table
has a Date/Time field.

All works fine, except that when I insert the record, ONLY
the Date is being stored..

e.g. If I use a value such as  #01-Mar-2001 12:34# then
after the update, I look in the table and it has been
saved as 01-Mar-2001.  My ADODB.Parameter object DOES have
the time stored when I Execute the Insert().

I've tried CDbl()'ing the Date but still no good...

I'm sure this worked fine with Access 97 a few weeks ago...

Any ideas?

Thanks,

Steve.



Fri, 26 Mar 2004 18:54:21 GMT  
 ADO with Access Date/Time field not storing the time, just the date
If using Now() does it work?


Sat, 27 Mar 2004 10:50:47 GMT  
 ADO with Access Date/Time field not storing the time, just the date

Quote:

> If using Now() does it work?

Unfortunately no, but I have managed to solve the problem
(this appears to be peculiar to Office 2000?)

I changed the type in my CreateParameter() to
adDBTimeStamp instead of adDate  and it worked fine.

Using adDate worked fine on an identical installation
with Office 97, but failed with Office 2000

Bizarre..

Steve.



Sat, 27 Mar 2004 15:43:17 GMT  
 ADO with Access Date/Time field not storing the time, just the date
Solved it. I had installed Office 2000 AFTER MDAC 2.6. I re-installed
MDAC 2.6 and all is fine...

Steve.



Sat, 27 Mar 2004 23:47:26 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Matching system date/time with field date/time

2. bound masked field to date/time field in access not formatting right

3. Compare date in form with date/time in form with date/time in database

4. Null date values in Date/Time fields in Access DB

5. Access 7.0 Date/Time Fields not accessible using CR 4.6

6. combining a time and a date to one Date/Time value

7. start date/time, end date/time problem

8. How to subtract a date-time from a date-time

9. Converting %date% %time% to VB Time/Date

10. Extracting the date out of a Date/Time field

11. Date part of Date/Time Field

12. CR8 Distinct dates in Date/Time Field

 

 
Powered by phpBB® Forum Software