-1

I am unable to separate the date and time using the POSIX package in R. This is the sample data for separating the date and time in the two separate columns.

1 Answers1

0

You can use as.POSIXct function in R.

Below are the examples to get date & time from date string.

date <- as.POSIXct(strptime(date_string, '%d/%m/%Y'))

time <- as.POSIXct(strptime(date_string, '%H/%M/%S'))

Satya
  • 21
  • 3