Last active
July 5, 2020 20:19
-
-
Save CarlTBarnes/e39ff03a571295a3a9a0c89d10a6daaf to your computer and use it in GitHub Desktop.
Month name from Date or Month number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MonthName PROCEDURE(LONG DateOrMonth),STRING !Pass Clarion Date or Month Number 1 to 12 - Month name from @d04 | |
MonthName2 PROCEDURE(LONG DateOrMonth),STRING !Pass Clarion Date or Month Number 1 to 12 - Month name English Only | |
MonthName PROCEDURE(LONG DateOrMonth)!,STRING | |
N STRING(32),AUTO | |
CODE | |
IF DateOrMonth <= 12 THEN | |
DateOrMonth=DATE(DateOrMonth,1,2000) | |
END | |
N=FORMAT(DateOrMonth,@d04) !Format Month ##, YYYY | |
RETURN SUB(N,1,INSTRING(',',N)-4) | |
MonthName2 PROCEDURE(LONG DateOrMonth)!,STRING | |
CODE | |
IF DateOrMonth > 12 THEN | |
DateOrMonth=MONTH(DateOrMonth) | |
END | |
RETURN CHOOSE(DateOrMonth,'January','February','March','April','May','June','July','August','September','October','November','December','') | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment