Just a suggestion - but, why not when you do the Select - convert it
into a Text field using something like TTOC() - then just shoot that
text field into Excel - and it will already be preformatted! 

Just a thought...
-K- 

-----Original Message-----
From: [email protected] [mailto:[email protected]]
On Behalf Of Alan Bourke
Sent: Friday, May 29, 2009 8:15 AM

I'm automating Excel with VFP9, using ADO to populate rows in a
spreadsheet,as detailed here:
http://fox.wikis.com/wc.dll?Wiki~ExcelAutomation~VFP

Which all fine apart from the usual - bloody dates, or more specifically
datetimes. I'm running a SELECT on a VFP table similar to this:

VFP2Excel(_samples+'data\testdata.dbc','select * from
employee',.ActiveSheet.Range('A10'))

One of the VFP fields is DateTime, but it was going into Excel in US
format, i.e. month first. Nothing I could do with cell formats, custom
or otherwise, would change it. I can't see anything in the ADO
documentation about regionalisation. 

So I gave up and decided to put the date part in one column and the time
in another. But this *still* puts the date in with the wrong format...

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: 
http://leafe.com/archives/byMID/profox/289ea162f5642645b5cf64d624c66a1405578...@us-ny-mail-002.waitex.net
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to