Skip to content
Prev 17451 / 398513 Next

last day of month values

Hi Lukas

use the functions stpftime and strptime (see R documentation)
eg: as.numeric(strftime(f,format="%m")) for the months, year: "%y", day:
"%d"
Be carefull about leadings 0 (3 or 03) and try to write the year in 4
digits!
if your date is a string you can use as.numeric(substring(date,from,
length))
eg: month <- as.numeric(substring(date,4,2))
Lukas Kubin wrote: