Convert input in year-month-day format to date
as_ymd(x)
x
Input variable
Date variable of class Date
as_ymd("2013-1-1")