xbrowse to excel field date

Post Reply
User avatar
damianodec
Posts: 372
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia
Contact:

xbrowse to excel field date

Post by damianodec »

hi,
I have a xbrowse with:
--------------------------------------------------------------
code description date
--------------------------------------------------------------
aaa door 11/07/2020
bbb book 31/07/2020
...

date format is dd/mm/yyyy

when I use xbrowse:toexcel function and get my excel file("it" language) field date is in text format and not in date format,

how can I to get date field in date format in excel?

thanks
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: xbrowse to excel field date

Post by nageswaragunupudi »

Does xbrowse know that column 3 is a date?
How did you define columns in xbrowse?
Regards

G. N. Rao.
Hyderabad, India
User avatar
damianodec
Posts: 372
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia
Contact:

Re: xbrowse to excel field date

Post by damianodec »

hi Mr Rao
column date comes from a ado object.
it read a Db2 table from as400.
in the sql select column date is a date field
SELECT code, description, date...

code and description are varchar and date is date field.

thank you.
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: xbrowse to excel field date

Post by nageswaragunupudi »

After reading the recordset, can you please do this simple test?

Code: Select all

? oRs:Fields( "date" ):Type
? ValType( oRs:Fields( "date" ):Value )
 
Regards

G. N. Rao.
Hyderabad, India
User avatar
damianodec
Posts: 372
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia
Contact:

Re: xbrowse to excel field date

Post by damianodec »

thank you mr Rao, field was char from select.
FiveWin for xHarbour 17.09 - Sep. 2017 - Embarcadero C++ 7.00 for Win32
FWH 64 for Harbour 19.06 (MSVC++) Jun. 2019 - Harbour 3.2.0dev (r1904111533)
Visual Studio 2019 - Pelles C V.8.00.60 (Win64)
Post Reply