Partager via


TIME Function (Time)

Gets the current time from the operating system.

Syntax

  
Time := TIME  

Property Value/Return Value

Type: Time

The current time.

Remarks

The time that is returned is different for the Microsoft Dynamics NAV Windows client and Microsoft Dynamics NAV Web client. For the Windows client, TIME returns the current time of the computer that is running the client, as determined by the date and time settings of the operating system. For the Web client, the day is determined by the Regional Setting that is set in the client.

You can only use the TIME function to retrieve the time from the operating system. You cannot use it to set the time in the operating system.

Example

This example requires that you create the following text constant in the C/AL Globals window.

Name ConstValue
Text000 The current system time is %1.
MESSAGE(Text000, TIME);  

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

The current system time is 11:15:46 AM.

See Also

Time Data Type
Date and Time Functions