I have imported an excel file into R that has a Date and Time column that I need help formatting to match m/d/yyyy h:mm AM/PM
, similar to a custom date function in excel. The Date column is currently formatted as %Y-%M%-%D
and is in POSIXct format when imported to R. The Time column looks similar to the following:
File$Time <- c("0:00", "0:30", "1:00", "1:30", "13:30")
I need help converting these intervals to times as such 0:00 would be 12:00 AM and 13:30 would be 1:30 PM etc. Then I need to add 4 to each time to get it into UTC time. Once that has been done I need a single column that matches the m/d/yyyy h:mm AM/PM
format with the date and time from the excel file.
Thanks for any tips or help in advance!