Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.
Originally posted by: stonysmithI would use this:
m=USAGE_CALL_DATE.month()
mmm="xxxJANFEBMARAPRMAYJUNJULAUGSEPOCTNOVDEC".substr(m*3,3) #note the xxx as month(0)
emit mmm + "- " + USAGE_CALL_DATE.year().str() as Usage_Call_Month
However, you're not going to be able to sort on that column. April would always come first.
I would suggest keeping both columns in the data, sort on USAGE_CALL_DATE (the full date), and then remove that column just before output if you wish.