Dear all,
Suppose I have a date variable:
c = 99/05/12
I want to extract the parts of this date like month number, year and day. I
can do it in SPSS. Is it possible to do this in R as well?
Rgd,
-
Heres a
format.Date(c, %d)
format.Date(c, %m)
format.Date(c, %y)
format.Date(c, %Y)
On 01/02/07, stat stat [EMAIL PROTECTED] wrote:
Dear all,
Suppose I have a date variable:
c = 99/05/12
I want to extract the parts of this date like month number, year and
day. I can do it in SPSS. Is it
Read the help desk article in R News 4/1 about dates and note the table at the
end of it, in particular.
On 2/1/07, stat stat [EMAIL PROTECTED] wrote:
Dear all,
Suppose I have a date variable:
c = 99/05/12
I want to extract the parts of this date like month number, year and day. I
can
stat stat wrote:
Dear all,
Suppose I have a date variable:
c = 99/05/12
I want to extract the parts of this date like month number, year and day. I
can do it in SPSS. Is it possible to do this in R as well?
Rgd,
Yes. One way is to use substr(), e.g.:
Thank you Peter.
It was not my question but I was just about to start
the morning's work by searching Help and RSiteSearch()
for this exact question.
--- Peter Dalgaard [EMAIL PROTECTED] wrote:
stat stat wrote:
Dear all,
Suppose I have a date variable:
c = 99/05/12