Skip to content
Back to formatted view

Raw Message

Message-ID: <21069970.post@talk.nabble.com>
Date: 2008-12-18T10:15:04Z
From: Shruthi Jayaram
Subject: Parsing unusual date format
In-Reply-To: <21067562.post@talk.nabble.com>

Thanks so much everyone, these suggestions solve my problem in a very elegant
way. 

A friend and I also came up with this "brute force" solution:

T <- c("1993m10")
y <- gsub("m.", "", T)
m <- gsub(".*m", "", T)
d <- paste(y,"-0",m,"-","01", sep="")
T <- as.Date(d, format="%Y-%m-%d")

Thought I would post it in any case.

Shruthi
-- 
View this message in context: http://www.nabble.com/Parsing-unusual-date-format-tp21067562p21069970.html
Sent from the R help mailing list archive at Nabble.com.