View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming,microsoft.public.office.developer.vba,microsoft.public.excel.misc,microsoft.public.excel,microsoft.public.fox.helpwanted
Paul Pedersen Paul Pedersen is offline
external usenet poster
 
Posts: 18
Default Excel VBA - SQL to .dbf date problem - GETTING DESPERATE


I have run into trouble with that approach, finding that in some cases at
least, Excel datetimes are stored with fractional seconds.


"Cindy Winegarden" wrote in message
...
"Erasmus" wrote in message
oups.com...
And the next field along is time so I'm sure I'll struggle again.


Hi Erasmus,

To go further with what Anders said, VFP datetime values can be written
like "... Where DateTime = {^2007/06/29 10:30:59}" or "...Where DateTime =
Datetime(2007, 6, 29, 10, 30, 59)" or again as a parameter. The parameter
is perhaps the simplest because you just let the OLE DB data provider
translate between VB and FoxPro.


--
Cindy Winegarden


VFP OLE DB:
http://msdn2.microsoft.com/en-us/vfoxpro/bb190232.aspx
VFP ODBC: http://msdn2.microsoft.com/en-us/vfoxpro/bb190233.aspx