xbrowse to excel field date

xbrowse to excel field date

Postby damianodec » Fri Sep 18, 2020 7:55 am

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
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: xbrowse to excel field date

Postby nageswaragunupudi » Fri Sep 18, 2020 1:50 pm

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse to excel field date

Postby damianodec » Sat Sep 19, 2020 8:10 am

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
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia

Re: xbrowse to excel field date

Postby nageswaragunupudi » Sat Sep 19, 2020 8:15 am

After reading the recordset, can you please do this simple test?
Code: Select all  Expand view

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

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10631
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: xbrowse to excel field date

Postby damianodec » Tue Sep 22, 2020 1:03 pm

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)
User avatar
damianodec
 
Posts: 419
Joined: Wed Jun 06, 2007 2:58 pm
Location: Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 42 guests