Take a look at the "chron" package...

> as.chron("2004-8-1",format=c(dates="y-m-d")) - as.chron("1960-1-1",format=c(dates="y-m-d"))

Time in days:
[1] 16284


On 9/13/07, zhijie zhang <epistat@gmail.com> wrote:
>
> Dear Rusers,
>   I have some data in .csv file like "2004-8-1" and "2004-10-1", and
> i  need
> to convert them into days from the origin (January 1, 1960).
> I have tried the function date.mmddyyyy(), but cannot get it. Anybody can
> show me how to handle the date data?
>   Thanks very much!
>
> My dataset like:
> time
> 2004-8-1
> 2004-10-1
> 2001-9-1
> 2002-9-1
>
>
> --
> With Kind Regards,
>
> oooO:::::::::
> (..):::::::::
> :\.(:::Oooo::
> ::\_)::(..)::
> :::::::)./:::
> ::::::(_/::::
> :::::::::::::
> [***********************************************************************]
> Zhi Jie,Zhang ,PHD
> Tel:86-21-54237149
> Dept. of Epidemiology,School of Public Health,Fudan University
> Address:No. 138 Yi Xue Yuan Road,Shanghai,China
> Postcode:200032
> Email:epistat@gmail.com
> Website: www.statABC.com
> [***********************************************************************]
> oooO:::::::::
> (..):::::::::
> :\.(:::Oooo::
> ::\_)::(..)::
> :::::::)./:::
> ::::::(_/::::
> :::::::::::::
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org 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]]

