In Elasticsearch 6.2, I have an index where there are two timestamp fields as follows:
"start_ts": { "type": "date", "format": "epoch_second" },
"end_ts": { "type": "date", "format": "epoch_second" }
In my painless inline script, for some calculation, I want to convert them (doc["start_ts"]
and doc["end_ts"]
) to this string format (yyyymm
). Any idea how can it be done? I could not find any documentation for formatting in ES official documentation.