Question
February 6, 2008 at 11:44 AM
sjtm

Date issue in VBA and Access

by sjtm . Updated 18 years, 9 months ago

I’m trying to extract a date field from an Access table but all TDate gives me is “1/0/1900” when the Excel output should be “12/30/07”. Also, I’ve checked that it is a date/time data type in Access.

Help! Here’s my code. what else do I need to do? Thanks in advance!

Set rs = db.OpenRecordset(“SELECT * FROM DateTable WHERE TDate >=#2007-06-30#”, dbReadOnly)

Sheets(“Summary”).Cells(22, 5) = TDate

This discussion is locked

All Comments