Bearbeiten

Freigeben über


System.Today() Method

Version: Available or changed with runtime version 1.0.

Gets the current date set in the operating system.

Syntax

Date :=   System.Today()

Note

This method can be invoked using property access syntax.

Note

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

Return Value

Date
 Type: Date

Remarks

The date that is returned is different for the Business Central Web client and Dynamics NAV Client connected to Business Central. For the Web client, the day is determined by the time zone that is set under My Settings in the client. The very first time a user signs in, the system automatically determines the time zone based on the user's browser/computer. For the Dynamics NAV Client connected to Business Central, Today returns the current day of the computer that is running the client, as determined by the date and time settings of the operating system.

You can only use the Today method to retrieve the current date from the operating system. You cannot use it to set the date in the operating system.

Example

This example shows how to use the Today method.

var
    Text000: Label 'The current date is: %1';
begin
    Message(Text000, Today);  
end;

The message window could display the following:

The current date is: 05/27/08

System Data Type
Get Started with AL
Developing Extensions