Hi guys,
when i want to get hour i use this scripted field
LocalDateTime.ofInstant(Instant.ofEpochMilli(doc['@timestamp'].value.millis), ZoneId.of('Asia/Tehran')).getHour()
in the past i could get hour + ":" + min . i forgot what script i wrote.
i guess it was sth like that :
LocalDateTime.ofInstant(Instant.ofEpochMilli(doc['@timestamp'].value.millis), ZoneId.of('Asia/Tehran')).getHour() + ":" + LocalDateTime.ofInstant(Instant.ofEpochMilli(doc['@timestamp'].value.millis), ZoneId.of('Asia/Tehran')).getMin
but it doesn't work for me. can anyone help me ?