Get month name when input month number

nandanak

New Member
Is there any built in function in OpenEdge to get Month name when I input month number.
Ex : Input : 03 , Output : March
 

Cringer

ProgressTalk.com Moderator
Staff member
I don't think so, but this is easy to implement.
Code:
FUNCTION fn-MonthName RETURNS CHARACTER
  (INPUT ip-MonthNumber AS INTEGER):
  DEFINE VARIABLE lv-Months as CHARACTER NO-UNDO INITIAL "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".
  IF ip-MonthNumber LT 1 OR ip-MonthNumber GT 12 THEN
    RETURN "".
  RETURN ENTRY(ip-MonthNumber,lv-Months).
END.
 

nandanak

New Member
Thanks Cringer, your code helps me.
 
Top