Hi every one, I have tried many ways to extrat the year from the date variable of my data set.however. non of them works(substr statement etc) i even change the format of variable. note: the format of the varibale in the manual book is shown : Text (7) (YYYY-MM) variable what i want data_of_brith year 01APR24:00:00:00 24 01AUG25:00:00:00 25 01DEC32:00:00:00 32 ... my code: data want; set have; year = input(substr(data_of_brith, 6), 2.); run; the result are: 82, 61, 46 instead of 24, 25, 32 that i was expecting!!!!! your hepl will be really appreciated
... View more