# How to get a date\_range boundary on script

**URL:** <https://discuss.elastic.co/t/how-to-get-a-date-range-boundary-on-script/318148>\
**Category:** Elasticsearch\
**Created:** [November 4, 2022, 2:22am UTC](https://discuss.elastic.co/t/how-to-get-a-date-range-boundary-on-script/318148 "2022-11-04T02:22:09Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Victor\_Garcia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/victor_garcia/32/112923_2.png) [@Victor\_Garcia](https://discuss.elastic.co/u/Victor_Garcia)\
**Post date:** [November 4, 2022, 2:22am UTC](https://discuss.elastic.co/t/how-to-get-a-date-range-boundary-on-script/318148/1 "2022-11-04T02:22:09Z")

</div>

Hi,

How can I access to a date\_range field boundary on a script? I tried

```auto
doc['field.gte']

```

Also, I debug the class of the field

```auto
Debug.explain(doc['status.dates'])

```

and get org.elasticsearch.index.fielddata.ScriptDocValues.Strings.

Furthermore, I debug the class of the field value

```auto
Debug.explain(doc['status.dates'].value)

```

and get java.lang.String class

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [December 2, 2022, 2:23am UTC](https://discuss.elastic.co/t/how-to-get-a-date-range-boundary-on-script/318148/2 "2022-12-02T02:23:09Z")

</div>

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