# Adabas SQL Gateway & Dates

**URL:** <https://techcommunity.softwareag.com/t/adabas-sql-gateway-dates/186280>\
**Category:** Forum\
**Tags:** Adabas-Natural, Adabas, Adabas-Add-on-Products, SQL-Access, Mainframe-Integration, CONNX\
**Created:** [January 18, 2016, 7:05am UTC](https://techcommunity.softwareag.com/t/adabas-sql-gateway-dates/186280 "2016-01-18T07:05:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sandeep\_Kumar3](https://avatars.discourse-cdn.com/v4/letter/s/f04885/32.png) [@Sandeep\_Kumar3](https://techcommunity.softwareag.com/u/Sandeep_Kumar3)\
**Post date:** [January 18, 2016, 7:05am UTC](https://techcommunity.softwareag.com/t/adabas-sql-gateway-dates/186280/1 "2016-01-18T07:05: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/2015, then i need a formula to get the date 3 days after, return 23/09/2015

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

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

Thank,

---

<div class="post-metadata">

**Author:** ![Larry\_McGhaw](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/larry_mcghaw/32/562_2.png) [@Larry\_McGhaw](https://techcommunity.softwareag.com/u/Larry_McGhaw)\
**Post date:** [January 18, 2016, 7:35pm UTC](https://techcommunity.softwareag.com/t/adabas-sql-gateway-dates/186280/2 "2016-01-18T19:35:56Z")

</div>

select timestampadd(SQL\_TSI\_DAY, -3, current\_date())

---

<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, 3:35pm UTC](https://techcommunity.softwareag.com/t/adabas-sql-gateway-dates/186280/3 "2021-04-02T15:35:09Z")

</div>


