[prev in list] [next in list] [prev in thread] [next in thread] 

List:       r-help
Subject:    Re: [R] time between two dates
From:       Sebastian Schubert <schubert.seb () googlemail ! com>
Date:       2012-03-09 9:17:25
Message-ID: 4F59CAA5.4050604 () googlemail ! com
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


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" (application/pgp-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.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic