Hello Statalist,

I've a question regarding my dataset. I want to extract the year and month separate from my "first_payment_date" variable but nothing seems to work.
I have uploaded an attachment to see what my dataset looks like. This is for 1 loanid, and then I've 10,000 of different loanids and each loanid has one first payment date.
It looks like stata doesn't recognize that first payment date is a date which stands in this case for May 2007 (200705).
Could someone help me out with this?

Kind regards,
Gabe