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


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,


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,

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.

  • E Europe dd/mm/yyyy
  • G Germany
  • 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.)