Às 00:53 de 27/11/2024, Sorkin, John escreveu:
I am reading a string that has the following form:
"2020-08-26_05:15:01"
I want to convert the string to a date-time variable. I tired:
x <- "2007-02-01_10:10:30"
x <- as.POSIXct(x,tz=Sys.timezone())
x
but this did not work; the time portion was
On 11/26/24 16:53, Sorkin, John wrote:
I am reading a string that has the following form:
"2020-08-26_05:15:01"
I want to convert the string to a date-time variable. I tired:
x <- "2007-02-01_10:10:30"
That underscore is what's causing your problems. If it needs to stay in
there because y
I am reading a string that has the following form:
"2020-08-26_05:15:01"
I want to convert the string to a date-time variable. I tired:
x <- "2007-02-01_10:10:30"
x <- as.POSIXct(x,tz=Sys.timezone())
x
but this did not work; the time portion was ignored. I suspect the problem is
the _ between
3 matches
Mail list logo