# Date format. Example 'D'2500-12-31'

**URL:** <https://techcommunity.softwareag.com/t/date-format-example-d2500-12-31/203590>\
**Category:** Forum\
**Tags:** Adabas-Natural, Natural, NaturalONE, Adabas-Natural-Community-Edition\
**Created:** [April 25, 2019, 7:39pm UTC](https://techcommunity.softwareag.com/t/date-format-example-d2500-12-31/203590 "2019-04-25T19:39:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jorge\_Canessa1](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@Jorge\_Canessa1](https://techcommunity.softwareag.com/u/Jorge_Canessa1)\
**Post date:** [April 25, 2019, 7:39pm UTC](https://techcommunity.softwareag.com/t/date-format-example-d2500-12-31/203590/1 "2019-04-25T19:39:11Z")

</div>

Hi,

When I use the following format for date, for example, D’2500-12-31’ I get “E\_0027: Error in value specification (date format does not match DTFORM =” EUROPE ": DD /MM / YYYY) ". Is there a solution to the problem without changing the program? For in nature without ajax this works.

Best regards,  
Jorge

---

<div class="post-metadata">

**Author:** ![George\_Cooper](https://sea1.discourse-cdn.com/techcommunity/user_avatar/techcommunity.softwareag.com/george_cooper/32/7831_2.png) [@George\_Cooper](https://techcommunity.softwareag.com/u/George_Cooper)\
**Post date:** [April 25, 2019, 10:52pm UTC](https://techcommunity.softwareag.com/t/date-format-example-d2500-12-31/203590/2 "2019-04-25T22:52:27Z")

</div>

Hi,

You could check your Project Preferences for the DTFORM setting. NaturalONE CE comes with the default set to International format, but it looks like yours has been changed to European.

Project / Preferences / Natural / Regional Settings / Options has the Date Representation (DTFORM) list of the 4 choices. Set it to International and your constant should work.

Although this raises the question of whether it’s a good idea to use Date constants or not. In production systems I’ve always used Move Edited with a Date Mask so there is never a question how the DTFORM default is set.

Note that there is also DTFORM setting under Window / Preferences / Software AG / Natural / Regional Settings.

Hope that helps,  
George

---

<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:** [April 25, 2019, 11:06pm UTC](https://techcommunity.softwareag.com/t/date-format-example-d2500-12-31/203590/3 "2019-04-25T23:06:27Z")

</div>

It is necessary to decide on a default date format and then stick with it. Natural relies on a consistent date format across sessions, libraries, programs, etc. That is, you want all your date literals in the same format, across all your applications.

Date format is determined by the DTFORM parameter. [url][http://techcommunity.softwareag.com/ecosystem/documentation/naturalONE/natONE911/core/using/use-prefer.htm#use-prefer-regional-opt[/url]](http://techcommunity.softwareag.com/ecosystem/documentation/naturalONE/natONE911/core/using/use-prefer.htm#use-prefer-regional-opt%5B/url%5D)

- E Europe dd/mm/yyyy

- G Germany dd.mm.yyyy

- I International yyyy-mm-dd default

- U USA mm/dd/yyyy

Looks like you had the default setting when it worked before, but now have DTFORM=E. To use the yyyy-mm-dd format for your date literal (D’2500-12-31’), change the setting to DTFORM=I.

Using NaturalONE → Setting the Preferences → Regional Setttings → Options → DTFORM

(NOTE: Natural is smart enough to let you have users in different locales input different date formats while executing the same application.)

---

<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:42pm UTC](https://techcommunity.softwareag.com/t/date-format-example-d2500-12-31/203590/4 "2021-04-02T15:42:40Z")

</div>


