0

I want the Day name of record_created_at here, as MONDAY, TUESDAY, ... Format

I tried with the below, i'm getting the only first 3 letters and that too in Title case,

{
    "date_histogram": {
        "calendar_interval": "day",
        "field": "record_created_at",
        "format": "E"
    }
}

How can i can get full day name in Upper case?

DilLip_Chowdary
  • 841
  • 4
  • 18

1 Answers1

1

You can use below query and it will give you the full day names in aggregation. you can refer this document.

{
    "date_histogram": {
        "calendar_interval": "day",
        "field": "record_created_at",
        "format": "EEEE"
    }
}

You can not change the capitalization and you can done once getting response from Elasticsearch. You can refer this answer as Elasticsearch internally use DateTimeFormatter for formatting.

Sagar Patel
  • 4,993
  • 1
  • 8
  • 19