0

Getting NA trying to parse this date:

fasttime::fastPOSIXct("1967-01-01", required.components = 3)

How come?

Rafael
  • 3,096
  • 1
  • 23
  • 61

1 Answers1

2

It is mentioned in the ?fastPOSIXct description

fastPOSIXct converts timestamps in textual (string) form into POSIXct objects. It interprets sequences of digits separated by non-digits as a timestamp in GMT. The order of interpretation is fixed: year, month, day, hour, minute, second. Note that only true (positive) POSIX dates (since 1970-01-01 00:00:00) are supported and fastPOSIXct accepts dates up to year 2199.

akrun
  • 874,273
  • 37
  • 540
  • 662
  • 6
    `anytime::anytime("1967-01-01")` works just fine. `anydate()` too, of course. Both C++ based, and because they 'guestimate formats' both a little bit slower than `fasttime`, and more general. (Disclaimer: I wrote the package.) – Dirk Eddelbuettel Aug 11 '21 at 22:29
  • @Rafael yes, i do – akrun Aug 11 '21 at 22:59