Hello everyone, I'm brand new to learning STATA, so I apologize if I am omitting any pertinent information. I have looked through previous posts on this topic, but am having trouble understanding how to code it.

I am attempting to extract the year from the date listed.

The data is currently listed in this format: testdate is 2012-03-12 00:00:00

I would like to simply create a new column with the year from the testdate column.
I really appreciate the help.
Thanks.
Lori