ElasticsearchClient datetime?

Hi all. I just upgraded ElasticsearchClient to 8.8. A Builder that used to accept a String ("now-7d") now needs a DateTime object. Does anyone have a working example of DateTime usage?

This used to work:

requestBuilder.start("now-7d");

But now it needs this:

private DateTime(long epochMillis, String str, DateTimeFormatter format)

Thanks!

Duh. RTFM, Brian!

:slight_smile:

		requestBuilder.start(DateTime.of("now-7d"));

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.