powered by
Convert dates to numeric years with decimal as fraction of a year
date2yeardec(date)
a scalar (class 'numeric')
a date (class 'Date')
date2yeardec(Sys.Date())
Run the code above in your browser using DataLab