System.NormalDate(Date) Method

Version: Available or changed with runtime version 1.0.

Gets the regular date (instead of the closing date) for the argument Date.

Syntax

NormalDate :=   System.NormalDate(Date: Date)

Note

This method can be invoked without specifying the data type name.

Parameters

Date
 Type: Date
The input date. You can enter a closing date or a normal date. A run-time error occurs if the value of Date is set to the undefined date (0D).

Return Value

NormalDate
 Type: Date

Example 1

The input date is a regular date.

var
    InputDate: Date;
    OutputDate: Date;
    Text000: Label 'The normal date for %1 is %2.';
begin
    InputDate := 20140404D;  
    OutputDate := NormalDate(InputDate);  
    Message(Text000, InputDate, OutputDate);  
end;

On a computer that has the regional format set to English (United States), the message window displays the following:

The normal date for 04/04/14 is 04/04/14.

Example 2

The input date is a closing date.

var
    InputDate: Date;
    OutputDate: Date;
    Text000: Label 'The normal date for %1 is %2.';
begin
    InputDate := ClosingDate(20140404C);  
    OutputDate := NormalDate(InputDate);  
    Message(Text001, InputDate, OutputDate);  
end;

On a computer that has the regional format set to English (United States), the message window displays the following:

The normal date for C04/04/14 is 04/04/14.

System Data Type
Get Started with AL
Developing Extensions