# Simple query using date\_add

**URL:** <https://forum.opensearch.org/t/simple-query-using-date-add/6488>\
**Category:** SQL\
**Created:** [July 13, 2021, 5:28pm UTC](https://forum.opensearch.org/t/simple-query-using-date-add/6488 "2021-07-13T17:28:30Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![jpf321](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.opensearch.org/jpf321/32/1725_2.png) [@jpf321](https://forum.opensearch.org/u/jpf321)\
**Post date:** [July 14, 2021, 4:31pm UTC](https://forum.opensearch.org/t/simple-query-using-date-add/6488/4 "2021-07-14T16:31:44Z")

</div>

Thanks for bumping this @searchymcsearchface

As it turns out, AWS ES 7.9 has the “new SQL engine” disabled. Running the following seems to enable it and open up the world of date\_functions which were born in 1.11.0 but “hidden” until 1.13.0 when the “new engine” was enabled by default.

```auto
PUT _opendistro/_sql/settings
{
  "transient" : {
    "opendistro.sql.engine.new.enabled" : "true"
  }
}

```

There was a bunch of digging that went into this one … and the keys came from here:

> [@Issues with SQL Date Filtering](https://forum.opensearch.org/t/issues-with-sql-date-filtering/4204/2):
>
> Hi @rc12, sorry for the confusion. I guess this is because you didn’t enable the new SQL engine for this date function and interval type support: [GitHub - opendistro-for-elasticsearch/sql: mag Open Distro SQL Plugin](https://github.com/opendistro-for-elasticsearch/sql#experimental). This would be avoided once this new engine released later and enabled by default. Thanks!

and eventually led me here:

> <https://github.com/opendistro-for-elasticsearch/sql/blob/develop/docs/user/admin/settings.rst#opendistro-sql-engine-new-enabled>

of course YMMV but that’s what we’ve found and what we are going with.

---

_[View the full topic](https://forum.opensearch.org/t/simple-query-using-date-add/6488)._
