Dave Jones
New Member
- Joined
- Oct 22, 2014
- Messages
- 3
I have an Excel spreadsheet created in Excel 2007 which extracts, via VBA/SQL, data from an Access database created in Access 2007. This works fine in Excel 2007. We are in the process of moving to Office 2013. I find that Excel 2013 does not extract Date/Time fields in the same way. I have a date/time field in Access with a "short time" format which when extracted to Excel 2013 gives a value of 00:00:00. Date/Time fields containing Dates export OK.
SQLString = "SELECT ID,SchedNo, OLSN, StartDate, ProductName, ResNo, StartTime, FinishDate, FinishTime, TotalMetreageProduced, DieNo, PumpNo FROM SchedDetails WHERE TimeOfRecord > #" & Format(Date - SearchDays, "mm/dd/yy") & "#"
Should I be doing something different in Excel 2013
Thanks
SQLString = "SELECT ID,SchedNo, OLSN, StartDate, ProductName, ResNo, StartTime, FinishDate, FinishTime, TotalMetreageProduced, DieNo, PumpNo FROM SchedDetails WHERE TimeOfRecord > #" & Format(Date - SearchDays, "mm/dd/yy") & "#"
Should I be doing something different in Excel 2013
Thanks