I imported a csv file with dates from a SQL query, but the dates are really date-time values and R doesn't seem to recognize them as dates. How do I convert them to dates? (I don't need to include the time portion.)
> mydate
[1] 1/15/2006 0:00:00
2373 Levels: 1/1/2006 0:00:00 1/1/2007 0:00:00 1/1/2008 0:00:00 ... 9/9/2012 0:00:00
> class(mydate)
[1] "factor"> as.Date(mydate)
Error in charToDate(x) :
character string is not in a standard unambiguous format
How do I convert mydate to a date?