Kbase 16712: Start up option -d affects date ORDER not FORMAT ( ymd )
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  5/10/1998 |
|
Start up option -d affects date ORDER not FORMAT ( ymd )
Start up parameter -d affects only the ORDER not the FORMAT
-----------------------------------------------------------
The -d start up parameter determines the ORDER of a date
field; for instance, you can use the -d to specify the order
as YEAR MONTH DAY (-d ymd) which is different from the default of
MONTH DAY YEAR. A date that would be displayed as 12/25/97 by default
would be displayed as follows with the -d ymd start up option:
97/12/25
It is important to note that the -d option only affects
the ORDER and not the FORMAT of the date. This means that
dates of a certain format will not display as you may expect them to.
For instance, a date with format 99/99/9999 will display by default
as 12/25/1997. If you start Progress with -d ymd the same date will
display as follows:
97/12/0025
As you can see by the example above, the order of the month,day,year
are as specified by the -d, BUT the format is still 99/99/9999.
How to work around this?
------------------------
Currently, the only workaround that exists for this problem is not
very portable. It requires you to change the format at runtime using
the FORMAT attribute or by putting a FORMAT phrase on each display
command.
For instance, the following code, run with -d ymd will display the
date as 1997/12/25:
def var idate as DATE format "99/99/9999" init "12/25/1997".
define frame x idate.
idate:format = "9999/99/99". /* add this to change format */
display idate with frame x.
OR
def var idate as DATE init "12/25/1997".
display idate format "9999/99/99". /* add this to change format */
Progress Software Technical Support Note # 16712