0

Why is this not giving me a whole number of days?

difftime("2015-04-22", "2014-10-30")

Time difference of 173.9583 days
ChrisP
  • 119
  • 1
  • 8

1 Answers1

2

Use the Date class to avoid the extra complexity of timestamps, daylight savings time, etc.

> as.Date("2015-04-22") - as.Date("2014-10-30")
Time difference of 174 days
Gregor Thomas
  • 136,190
  • 20
  • 167
  • 294