?strptime Read the documentation and you will find reference to "%OSn"
> x <- strptime('13:45:34.123', format="%H:%M:%OS") > x [1] "2010-04-22 13:45:34" > format(x, format="%H:%M:%OS3") [1] "13:45:34.123" > On Thu, Apr 22, 2010 at 2:58 AM, Carol Gao <carol.g...@gmail.com> wrote: > Hi, > > Does anyone know how to take a time difference when the format of the time > is as 13:22:23.586? I am trying to take the difference of time between > stock > transactions and need to keep the three decimal places for seconds. I have > tried *diff(strptime(x, "%H:%M:%S.000))*, but apperantly that doesn't work. > > Carol Gao > > [[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<http://www.r-project.org/posting-guide.html> > and provide commented, minimal, self-contained, reproducible code. > -- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? [[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.