# Adabas SQL Gateway & Dates

**URL:** <https://techcommunity.softwareag.com/t/adabas-sql-gateway-dates/57791>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-Add-on-Products, SQL-Access, Mainframe-Integration, CONNX\
**Created:** [September 26, 2005, 11:59pm UTC](https://techcommunity.softwareag.com/t/adabas-sql-gateway-dates/57791 "2005-09-26T23:59:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Boris\_Prado](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@Boris\_Prado](https://techcommunity.softwareag.com/u/Boris_Prado)\
**Post date:** [September 26, 2005, 11:59pm UTC](https://techcommunity.softwareag.com/t/adabas-sql-gateway-dates/57791/1 "2005-09-26T23:59:20Z")

</div>

Hi, i need to know how to manage the dates using sql gateway

I need to the get the date of the system and substract 3 days back, for example is today is 26/09/2006, then i need a formula to get the date 3 days after, return 23/09/2006

in MSQL i use select dateadd(day,-3,getdate())

how can i do the same in adabas sql gateway??

thanks

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [September 29, 2005, 11:13pm UTC](https://techcommunity.softwareag.com/t/adabas-sql-gateway-dates/57791/2 "2005-09-29T23:13:03Z")

</div>

Please try the following:

```
   SELECT timestampadd(SQL_TSI_DAY, -3, current_date())

```

which returns

```
   9/26/2005

```

For further information - please refer to the User Reference Guide.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/techcommunity/original/3X/c/d/cd19967bb605d28a72d77eb83a1cae22f3df2eb8.svg) [@system](https://techcommunity.softwareag.com/u/system)\
**Post date:** [April 2, 2021, 2:38pm UTC](https://techcommunity.softwareag.com/t/adabas-sql-gateway-dates/57791/3 "2021-04-02T14:38:52Z")

</div>


