Hello gang
I'm trying to fix such that my date variable, specifically the one showing month, looks a little "cleaner". Initially I had a date variable that showed the date that an insurance customer set up an insurance offer: "date_insurance_offer". I then used this to make two new variables showing the dates in months and quarters by writing the code:
generate insurance_offer_month = mofd(date_insurance_offer)
format insurance_offer_month %tm
generate insurance_offer_quarter = qofd(date_insurance_offer)
format insurance_offer_quarter %tq
Now the variable showing the quarters is fine, but the variable showing the months is showing 2020m1 for january 2020, 2020m2 for february 2020 etc. What i wanted to do is to make the variable "insurance_offer_month" show the months as they are named. For example 2020m1 would preferably be 2020jan, 2020m2 would be 2020feb etc, or something similar.
Is this possible somehow?
Appreciate any help!
I'm trying to fix such that my date variable, specifically the one showing month, looks a little "cleaner". Initially I had a date variable that showed the date that an insurance customer set up an insurance offer: "date_insurance_offer". I then used this to make two new variables showing the dates in months and quarters by writing the code:
generate insurance_offer_month = mofd(date_insurance_offer)
format insurance_offer_month %tm
generate insurance_offer_quarter = qofd(date_insurance_offer)
format insurance_offer_quarter %tq
Now the variable showing the quarters is fine, but the variable showing the months is showing 2020m1 for january 2020, 2020m2 for february 2020 etc. What i wanted to do is to make the variable "insurance_offer_month" show the months as they are named. For example 2020m1 would preferably be 2020jan, 2020m2 would be 2020feb etc, or something similar.
Is this possible somehow?
Appreciate any help!

Comment