TODAY, TIME, and CURRENTDATETIME

TODAY retrieves the current system date as set in the operating system. TIME retrieves the current system time as set in the operating system. CURRENTDATETIME retrieves the current date and time in the DATETIME format, which is stored in UTC international time (formerly referenced as GMT or Greenwich Mean Time) and then displayed in local time. If we are using the Windows client, these use the time setting in the NAV Client. If the system operates in multiple time zones at one time, search Microsoft Dynamics NAV Help on time zone for the several references on how to deal with multiple time zones.

The syntax for each of these follows:

DateField := TODAY; 
TimeField := TIME;
DateTimeField := CURRENTDATETIME;

These are often used for date- and time-stamping transactions or for filling in default values in fields of the appropriate data type. For data entry purposes, the current system date can be entered by simply typing the letter T or the word TODAY in the date entry field (this is not a case-sensitive entry). NAV will automatically convert that entry to the current system date.

The undefined date in NAV 2017 is represented by the earliest valid DATETIME in SQL Server, which is January 1, 1753 00:00:00:000. The undefined date in NAV is represented as 0D (zero D, as in Days), with subsequent dates handled through December 31, 9999. A date outside this range will result in a runtime error.

The Microsoft Dynamics NAV undefined time (0T) is represented by the same value as an undefined date (0D) is represented.

If a two-digit year is entered or stored as a date and has a value of 30 to 99, it is assumed to be in the 1900s. If the two-digit date is in the range of 00 to 29, then it is treated as a 2000s date.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset