Skip to content
Prev 20276 / 63421 Next

strptime failure R 2.2.1 (PR#8773)

It doesn't do that for me:
strptm> format(Sys.time(), "%a %b %d %X %Y %Z")
[1] "Sat Apr 15 1:37:39 PM 2006 Eastern Daylight Time"

strptm> x <- c("1jan1960", "2jan1960", "31mar1960", "30jul1960")

strptm> z <- strptime(x, "%d%b%Y")

strptm> z
[1] "1960-01-01" "1960-01-02" "1960-03-31" "1960-07-30"

strptm> dates <- c("02/27/92", "02/27/92", "01/14/92", "02/28/92",
    "02/01/92")

strptm> times <- c("23:03:20", "22:29:56", "01:03:30", "18:21:03",
    "16:56:26")

strptm> x <- paste(dates, times)

strptm> z <- strptime(x, "%m/%d/%y %H:%M:%S")

strptm> z
[1] "1992-02-27 23:03:20" "1992-02-27 22:29:56" "1992-01-14 01:03:30"
[4] "1992-02-28 18:21:03" "1992-02-01 16:56:26"
[1] "R version 2.2.1, 2005-12-20"

        
On 4/15/06, hutch at moneyware.com <hutch at moneyware.com> wrote: