Skip to content
Prev 178661 / 398506 Next

help working with date values

Steve_Friedman at nps.gov wrote:
year <- as.numeric(format((strptime(observation_date, "%Y-%m-%d")), "%Y"))

or

year <- as.numeric(substr(observation_date, 1, 4))


Uwe Ligges