R doesnt recognize datetime.now on get_timeseries

Im testing the eikon kibrary in r and get_timeseries returns an error because R doesnt recognize datetime.now. I couldnt find a package with this function. Does anyone knows how to fix it?

message error:

df =get_timeseries (as.list ('MSFT.O'),
+ "2016-01-04",
+ "2016-01-06",
+ debug = FALSE)
Error in datetime.now(tzlocal()) : could not find function "datetime.now"

Best Answer

  • Jirapongse
    Jirapongse ✭✭✭✭✭
    Answer ✓

    @marcelo.hiroki

    Refer to the eikonapir page, the usage of get_timeseries is:

    get_timeseries(rics, fields = "*", start_date = NULL,
      end_date = NULL, interval = "daily", normalize = FALSE,
      count = NULL, calendar = NULL, corax = NULL, raw_output = FALSE,
      debug = FALSE)

    The second parameter is fields, not date, and the date format is "2016-01-04T00:00:00". Therefore, the working code is:

    image