Focal Point
[SOLVED] get the month name

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/2477081886

October 30, 2017, 01:31 PM
Badr.A
[SOLVED] get the month name
Hello there,
I'm trying to write a report that needs to retrieve the number of calls received into the center every month, but I stuck in how to return the name of the month not the number of the month. I'm using here the REDEFIN the name of the field as the following code:

DEFINE FILE CALL_CENTER/CALL_STATS
C_MONTH REDEFINES CALL_STATS.CALL_STATS.C_MONTH = LCWORD(10, CHGDAT('YYMD','MX',C_MONTH,'A10') ,'A10');


END
TABLE FILE CALL_CENTER/CALL_STATS
.
.
.
anyone knows how to display the name of the month instead of the number please?

This message has been edited. Last edited by: Badr.A,


WebFocus App Studio
V8201
October 30, 2017, 01:35 PM
BabakNYC
Try switching the format from YYMD to YYMtrDm.


WebFOCUS 8206, Unix, Windows
October 30, 2017, 02:21 PM
MartinY
There are several ways and format available (short, long, w/ or w/o year, ...). Depending on the format of the source Date, you may have to use more than one function.

Below are some sample (also Babak one)

DEFINE FILE GGSALES
Mth/Mtr = DATE;
YMthD/YYMtrD = DATE;
YMth/YYMtrDm = DATE;
END
TABLE FILE GGSALES
PRINT DATE/Mtr
      Mth
      YMthD
      YMth
BY DATE
WHERE READLIMIT   EQ 5;
WHERE RECORDLIMIT EQ 5;
END



WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
October 30, 2017, 02:52 PM
Badr.A
thank you, it works as I want by Define method, I was using REDEFINE.


WebFocus App Studio
V8201
October 30, 2017, 04:01 PM
MartinY
Badr,

Edit your first post then in the subject, at the beginning add [SOLVED].

Tks


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007