# Subtract 1 from a date

**URL:** <https://techcommunity.softwareag.com/t/subtract-1-from-a-date/234897>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-on-Mainframes\
**Created:** [October 30, 2020, 5:40pm UTC](https://techcommunity.softwareag.com/t/subtract-1-from-a-date/234897 "2020-10-30T17:40:52Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mytwo22](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@mytwo22](https://techcommunity.softwareag.com/u/mytwo22)\
**Post date:** [October 30, 2020, 5:40pm UTC](https://techcommunity.softwareag.com/t/subtract-1-from-a-date/234897/1 "2020-10-30T17:40:52Z")

</div>

Does Natural calculate how many days in a month? i need to get Date minus one day. Thanks!

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [October 30, 2020, 5:46pm UTC](https://techcommunity.softwareag.com/t/subtract-1-from-a-date/234897/2 "2020-10-30T17:46:17Z")

</div>

D-format variables allow simple computations.

```auto
1 #DATE (D) INIT <*DATX>

SUBTRACT 1 FROM #DATE

ASSIGN #DATE = #DATE - 1

```

---

<div class="post-metadata">

**Author:** ![mytwo22](https://avatars.discourse-cdn.com/v4/letter/m/f08c70/32.png) [@mytwo22](https://techcommunity.softwareag.com/u/mytwo22)\
**Post date:** [October 30, 2020, 5:54pm UTC](https://techcommunity.softwareag.com/t/subtract-1-from-a-date/234897/3 "2020-10-30T17:54:47Z")

</div>

thank you so much. I dont have any of my manuals at home.

---

<div class="post-metadata">

**Author:** ![Ralph\_Zbrog](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/ralph_zbrog/32/78_2.png) [@Ralph\_Zbrog](https://techcommunity.softwareag.com/u/Ralph_Zbrog)\
**Post date:** [October 30, 2020, 6:32pm UTC](https://techcommunity.softwareag.com/t/subtract-1-from-a-date/234897/4 "2020-10-30T18:32:47Z")

</div>

Usually, all the latest manuals are available here in the TechCommunity, but SAG is having technical difficulties these days.

---

<div class="post-metadata">

**Author:** ![Eli\_Cohen1](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/eli_cohen1/32/39733_2.png) [@Eli\_Cohen1](https://techcommunity.softwareag.com/u/Eli_Cohen1)\
**Post date:** [November 1, 2020, 6:30am UTC](https://techcommunity.softwareag.com/t/subtract-1-from-a-date/234897/5 "2020-11-01T06:30:04Z")

</div>

The documentation will be available soon.  
In the mean time you may see it here :

[https://support-usgov.softwareaggov.com/Documentation/A&N/](https://support-usgov.softwareaggov.com/Documentation/A&N/)

Eli

---

<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:45pm UTC](https://techcommunity.softwareag.com/t/subtract-1-from-a-date/234897/6 "2021-04-02T15:45:21Z")

</div>


