# How to define an empty DATE as constant

**URL:** <https://techcommunity.softwareag.com/t/how-to-define-an-empty-date-as-constant/206212>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, Natural-News-and-General-Topics\
**Created:** [November 25, 2019, 1:05pm UTC](https://techcommunity.softwareag.com/t/how-to-define-an-empty-date-as-constant/206212 "2019-11-25T13:05:35Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChristianHeld](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/christianheld/32/138_2.png) [@ChristianHeld](https://techcommunity.softwareag.com/u/ChristianHeld)\
**Post date:** [November 25, 2019, 1:05pm UTC](https://techcommunity.softwareag.com/t/how-to-define-an-empty-date-as-constant/206212/1 "2019-11-25T13:05:35Z")

</div>

I have a simple-minded question, but I am unable to find a solution, this after checking the available documentation.  
Maybe someone has a solution.

My "problem":

If I define a DATE variable like this

1 NULL\_DATE (D)

I get a piece of storage containing X’0000000F’. Everything is fine.

For aestheic reasons, I want is to define NULL\_DATE as a constant. And here the trouble starts:

1 NULL\_DATE (D) CONST\< D’no idea what to specify’ \>

Up to know I was not able to specifiy a valid Date constant which results in a X’0000000F’ value.  
Am i hopeless with this?

Regards chris

---

<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:** [November 25, 2019, 5:44pm UTC](https://techcommunity.softwareag.com/t/how-to-define-an-empty-date-as-constant/206212/2 "2019-11-25T17:44:02Z")

</div>

> [@](#):
>
> Am i hopeless with this?

Yes, Chris, you are hopeless. 🙂

A date field can be initialized (INIT or CONST) only with a valid value, so at minimum 01/01/1582.

---

<div class="post-metadata">

**Author:** ![ChristianHeld](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/christianheld/32/138_2.png) [@ChristianHeld](https://techcommunity.softwareag.com/u/ChristianHeld)\
**Post date:** [November 26, 2019, 10:01am UTC](https://techcommunity.softwareag.com/t/how-to-define-an-empty-date-as-constant/206212/3 "2019-11-26T10:01:17Z")

</div>

Hi Ralph,

your reply matches my test results. It is like it is.

regards Chris

---

<div class="post-metadata">

**Author:** ![Steve\_Robinson](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/steve_robinson/32/107_2.png) [@Steve\_Robinson](https://techcommunity.softwareag.com/u/Steve_Robinson)\
**Post date:** [November 26, 2019, 1:23pm UTC](https://techcommunity.softwareag.com/t/how-to-define-an-empty-date-as-constant/206212/4 "2019-11-26T13:23:31Z")

</div>

Depending on what you are trying to accomplish, you could have something like:

1 NULL\_DATE\_B (B) CONST \<X’0000000F’\>  
1 REDEFINE NULL\_DATE\_B  
2 NULL\_DATE\_D (D)

---

<div class="post-metadata">

**Author:** ![ChristianHeld](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/christianheld/32/138_2.png) [@ChristianHeld](https://techcommunity.softwareag.com/u/ChristianHeld)\
**Post date:** [November 26, 2019, 2:13pm UTC](https://techcommunity.softwareag.com/t/how-to-define-an-empty-date-as-constant/206212/5 "2019-11-26T14:13:05Z")

</div>

Hi Steve

thx for this tipp, which is well-known for me.  
In my first posting I mentioned an “aesthetic” motivation to use a constant declaration.

To use a redefined constant declaration will work but contradicts my aesthetic coding style in this specific case.

To sum up:  
We can close this issue, due to Ralph’s feedback.  
I’ll stay with my “no constant” style.

regards Chris

---

<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:43pm UTC](https://techcommunity.softwareag.com/t/how-to-define-an-empty-date-as-constant/206212/6 "2021-04-02T15:43:50Z")

</div>


