How do we compare dates in Natural? Suppose I want to select a policy whose inception date is less than 12 Jun 2009. How should my query look like?
I know the below query will work in my case (as the date format in adabas file is YYYYMMDD) but wanted to know a standard way of comparing date.
F062-INCEP-DATE < 20090612
Pardon me if it sounds silly but I am pretty novice to Naturals.
Joined: 21 Nov 2009 Posts: 58 Location: California
As Ofer71 says, there is no standard, but a common practice is to convert your external date variable (eg A8: yyyymmdd) to a temporary D-format variable using a MOVE EDITED. The D-format makes comparisons and computations simple and straightforward.
For example, RockyS' comparison would look something like this: