Skip to content

Instantly share code, notes, and snippets.

@CarlTBarnes
Last active July 5, 2020 20:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CarlTBarnes/e39ff03a571295a3a9a0c89d10a6daaf to your computer and use it in GitHub Desktop.
Save CarlTBarnes/e39ff03a571295a3a9a0c89d10a6daaf to your computer and use it in GitHub Desktop.
Month name from Date or Month number
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