On 09/03/12 10:04, carol white wrote: > Dear All, > It may be a trivial question but how to determine the number of days between > two dates? What I want to do is to subtract two dates by a function which > returns the number of days between these two dates. > > 11.11.2008-11.11.2006 ~= 730 days
> start <- strptime("20061111", format="%Y%m%d") > end <- strptime("20081111", format="%Y%m%d") > end-start Time difference of 731 days HTH Sebastian
signature.asc
Description: OpenPGP digital signature
______________________________________________ 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.