Convert column of Unix to date time

2018-02-11T09:23:09

Trying to convert a full column of Unix into date time in R. I've been able to use

as.POSIXlt(x, origin = "1970-01-01")

to convert Unix. But now I'm trying to convert a whole column of Unix into date time using:

as.POSIXct(x$time, origin="1970-01-01")

Which gives me:

Error in as.POSIXlt.character(as.character(x), ...) : character string is not in a standard unambiguous format`

What is the best way to be doing this?

Copyright License:
Author:「harkintr」,Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.
Link to:https://stackoverflow.com/questions/48727317/convert-column-of-unix-to-date-time

About “Convert column of Unix to date time” questions

Trying to convert a full column of Unix into date time in R. I've been able to use as.POSIXlt(x, origin = "1970-01-01") to convert Unix. But now I'm trying to convert a whole column of Unix into ...
I have a dataframe which has a column (expires) with unix time codes. I want to convert these to TWO separate columns, one for time (expires_time) and one for date (expires_date). I've started with a
I am trying to create a script to convert two columns in a .csv file which are date and time into unix timestamps. So i need to get the date and time column from each row, convert it and insert it ...
I am trying to create a new column in my table to convert a unix time column into human readable date and time. I have found a few functions but am having trouble with the syntax as I do not norm...
I want to convert "2013-09-16" into unix time. I found Convert UNIX epoch to Date object in R but I need to do the reverse of that. Thanks!
I want to convert "2013-09-16" into unix time. I found Convert UNIX epoch to Date object in R but I need to do the reverse of that. Thanks!
I am a little confused with the unix time stamp conversion to java.util.Date involving the time zones. I have a unix time stamp that is "1367832568". it is a UTC date (Mon May 06 17:29:28 GMT+00:0...
Does anyone of you have suggestions how to convert the Unix timestamp to ABAP MEZ/MESZ time and date? The following code is from the ABAP-Reference, the code is for timestamps with lenght 15 or 2...
Im trying to convert a timestamp to a human readable date and time. I tried: String dateSt = 1386580621268; Log.i("*****", "date st is = "+dateSt); long unixSeconds = Long.parseLong(dateSt); Log....
I am using the following code to convert a column of unix time values into dates in pyspark: transactions3=transactions2.withColumn('date', transactions2['time'].cast('date')) The column transact...

Copyright License:Reproduced under the CC 4.0 BY-SA copyright license with link to original source & disclaimer.