Hi,

perhaps:
format.Date(as.Date("1979-12-20"), "%m")

-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

On 21/08/07, Gonçalo Ferraz <[EMAIL PROTECTED]> wrote:
>
> Hi,
> Anyone knows what would be a short way of extracting a month from a date
> in
> numeric or integer format?
>
> months("1979-12-20")
> returns
> "December" in character format.
>
> How could I get 12 in numeric or integer format?
>
> Thanks!
>
> G.
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to