Luis GomezDelCampo
New Member
Good day,
In this case I am trying to use a straight-forward "export xx_table" command (rather than to use a put for each field) but make all dates use a specific format.
I have found some work arounds but I assume there is a better way to do it.
It has been a while and can't remember if there is a straight-forward method.
The first issue is the YYYY, a session startup parameter can handle it but let's say, it is not in use (e.g. programs only use "yy")
Also, using century offset works to force YYYY during export but is a mmmmmeh approach (and only partial).
ASSIGN SESSION:YEAR-OFFSET = 1000. /*FORCE YYYY*/
Then, comes the DMY vs MDY vs YMD... which can also be done with session startup parameters or change during the session but say... that is not the case.
ASSIGN SESSIONATE-FORMAT = "dmy". /*CHANGE TO DMY*/
Then comes the need to export using "." as separator instead of "/".
All these can be handled and are allowed in "format definition" of a variable or field but export ignores the field formatting and Progress does not allow defining a table field (or variable) as "DD.MM.YYYY" anyway (e.g. as in excel).
So, the question is, is there any SIMPLE way to specific format for all dates being exported without having to format: 1)name each field being exported, 2)having to use another field instead?
Consider:
Say my session is -mdy using YY....
my date fields are defined as 99/99/99 in format...
Example:
I have table with several date fields and they are formatted as 99/99/99. Say we have a date 01/31/20 (Jan 31 2020). What is the SIMPLEST approach to do a straight-forward export using DD.MM.YYYY format?
I am trying to see if I can so an "export xx_table" (rather than naming each field in the export or using text() command, or using another variable and logic to format it to replace it in the export?
for each customer no-lock:
export xx_customer delimiter ",".
/*how to get all dates show in "DD.MM.YYYY" format for this table?*/
end.
In this case I am trying to use a straight-forward "export xx_table" command (rather than to use a put for each field) but make all dates use a specific format.
I have found some work arounds but I assume there is a better way to do it.
It has been a while and can't remember if there is a straight-forward method.
The first issue is the YYYY, a session startup parameter can handle it but let's say, it is not in use (e.g. programs only use "yy")
Also, using century offset works to force YYYY during export but is a mmmmmeh approach (and only partial).
ASSIGN SESSION:YEAR-OFFSET = 1000. /*FORCE YYYY*/
Then, comes the DMY vs MDY vs YMD... which can also be done with session startup parameters or change during the session but say... that is not the case.
ASSIGN SESSIONATE-FORMAT = "dmy". /*CHANGE TO DMY*/
Then comes the need to export using "." as separator instead of "/".
All these can be handled and are allowed in "format definition" of a variable or field but export ignores the field formatting and Progress does not allow defining a table field (or variable) as "DD.MM.YYYY" anyway (e.g. as in excel).
So, the question is, is there any SIMPLE way to specific format for all dates being exported without having to format: 1)name each field being exported, 2)having to use another field instead?
Consider:
Say my session is -mdy using YY....
my date fields are defined as 99/99/99 in format...
Example:
I have table with several date fields and they are formatted as 99/99/99. Say we have a date 01/31/20 (Jan 31 2020). What is the SIMPLEST approach to do a straight-forward export using DD.MM.YYYY format?
I am trying to see if I can so an "export xx_table" (rather than naming each field in the export or using text() command, or using another variable and logic to format it to replace it in the export?
for each customer no-lock:
export xx_customer delimiter ",".
/*how to get all dates show in "DD.MM.YYYY" format for this table?*/
end.