Marco Turco wrote:Yes, it was a date issue.
I was unable to detect it due the fact that my (very very old) Norton Commander dbView displayed those dates exactly.
Thanks to all for the support.
Marco hi,
It's one of the best practices to use CENTURY ON, in other words, to
use the format dd/mm/yyyy, thus, you will avoid problems with some
centuries that don't exist any more (or are not usable), such as 0007
vice 2007 !
You can use in your main program at the entry point along with the
SET DATE .... (e.g. ITALIAN), SET EPOCH TO ...
here's an example of what I use...
SET DATE BRITISH
SET EPOCH TO 1980
SET CENTURY ON
When users are lazy and type only the two last digits of a year, e.g.
"31/12/07", the program automatically converts it to "31/12/2007"
and not into "31/12/0007".
Another problem fixed below, is for displaying date fields in the browser
(e.g. TWBROWSE, or XBROWSE), with this method...
- Code: Select all Expand view RUN
REDEFINE LISTBOX oLbx1 FIELDS ;
PADC(History->STATUS,3) ,; // STATUS "S" or blank
Right(History->HISTNUMB,5) , ; // Autom.number
Right(History->FILENUMB,6) , ; // File number
SCTOC(DTOC(StoD(History->HISTDATE))) , ; // Date (dd-mm-yy)
.....
HEADERS "St." ,;
"Hist" ,;
"File" ,;
"Off.Date" ,;
The function SCTOC(...) converts the year into two digits thus, gaining
some width in the browser. Here's the function.
- Code: Select all Expand view RUN
Function SCTOC(x)
*---------------- Returns a date (Char type) from 10 chars to 8 chars (Sort)
* SCTOC(DTOC(StoD(History->HISTDATE))),; // Date (dd-mm-yy)
Local z := ""
if len(x) == 8
Return (x)
endif
z := left(x, 6) +; // 18-01-2003
right(x,2)
Return (z)
Kind regards
Evans
ps. I hope it helps you a little...