I'm using R and trying to convert a datetime field From this format 20Jul22:11:32:00 into 07/20/2022 date format.
I could not find any threads that address this exact problem. I actually tried the code below that worked for just the mentioned date. What I need to do is change the format for all the values in the column "DepartDT" in the "Patient" dataset.
Also, how does this work if the date is in this format "20Jul22:11:32:00"
DepartDT <- as.Date('20JUL21', format = '%d%b%y') format(DepartDT, '%m/%d/%Y')