In my table (over 12K lines), I have a Column named Sleep Day that comes in a chr type data with the following info template: 4/12/2016 12:00:00 AM
I tried to convert the chr to Date and time type, but it only shows the Date...
Here is my function (table´s name: conjunta_n):
conjunta_n$SleepDay<-as.Date(conjunta_n$SleepDay, format="%m/%d/%y %H:%M:%S")
The problem is that I keep getting one of these two results:
Output 1: 2020-04-12
Output 2: NA
I haven't been able to get the time part, nor the AM on a date and time template.
The desired output is:
4/12/2016 12:00:00 AM (in date-time type)
Please help!
(I`m new in R)