cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Browse apps to extend the software in the new JMP Marketplace
Choose Language Hide Translation Bar

extract year from a mdy variable

I have variable collection.date, in m/d/y format, and I want to create another variable, yr, by extracting year from collection.date. I have tried using the year function in a formula but haven't had any success. Any suggestions?
Thanks,
mgm
1 REPLY 1
XanGregg
Staff

Re: extract year from a mdy variable

Year() will work if your variable is a numeric date, but if it's a character date, you'll have to parse it first.

Year(Parse Date( "07/15/2000" ))