Subscribe Bookmark RSS Feed

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
XanGregg

Staff

Joined:

Jun 23, 2011

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" ))