Relative Content

Tag Archive for rdatetimelubridate

using POSIXct to try and clean datetime cells in a table

I am trying to clean some tables in r and I have two columns that are in date time value. I know that date time value cells are difficult to deal with. Part of my problem is that the cells are mixed in the data – some are set up as ‘dd/mm/yyyy hh:mm’ and others are formatted as ‘yyyy-mm-dd hh:mm’ and I need all of them to be formatted as ‘yyyy-mm-dd hh:mm’ however I also tried to split them so that one has the date and one has the time. I run this code that I have and it executes without an issue and or an error code but the columns ‘started_at_date’ and ‘started_at_time’ are both showing as ‘NA’ values in the table values.

using POSIXct to try and clean datetime cells in a table

I am trying to clean some tables in r and I have two columns that are in date time value. I know that date time value cells are difficult to deal with. Part of my problem is that the cells are mixed in the data – some are set up as ‘dd/mm/yyyy hh:mm’ and others are formatted as ‘yyyy-mm-dd hh:mm’ and I need all of them to be formatted as ‘yyyy-mm-dd hh:mm’ however I also tried to split them so that one has the date and one has the time. I run this code that I have and it executes without an issue and or an error code but the columns ‘started_at_date’ and ‘started_at_time’ are both showing as ‘NA’ values in the table values.