Consultor Eletrônico



Kbase 35619: Report Builder: How to print dates in different formats
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
Solution ID: P5619

GOAL:

Report Builder: How to print dates in different formats

GOAL:

Printing dates as strings in different languages

FACT(s) (Environment):

Progress 8.x
Progress 9.x

FIX:

Some times it is needed to print the dates in a "non" standard way,
using the calculated fields functions like DAY, MONTH, YEAR, STRING and SUBSTRING it is possible to format dates in most of the formats.

First create a calculated field in Report Builder using the "fx" button.

To print the name an abbreviation of the month in other language than English you can define the expression like:

SUBSTRING("JanFebMarAbrMayJunJulAgoSepNovDic", (MONTH(TODAY()) - 1) * 3 + 1,3)

To print the date in other numeric format like MMYYYY you can define the expression like:

STRING(MONTH(TODAY()),"99") + string(year(TODAY()),"9999")

Save the created function.

After this just insert a field and select "Calculated Fields" to paste the name of the function.