Function to returns the UTC date time from a DateTime field.
The datetime is stored in the database as Coordinated Universal Time (UTC). UTC is the international time standard (formerly Greenwich Mean Time, or GMT). Zero hours UTC is midnight at 0 degrees longitude. The datetime is always displayed as local time in Dynamics NAV. Local time is determined by the time zone regional settings used by your computer.
You must always enter datetimes as local time. When you enter a datetime as local time, it is converted to UTC using the current settings for the time zone and daylight saving time.
This function returns the UTC date time.
Version 1.05:
Fix. date bug.
Version 1.04:
Fix. date bug when passing midnight!
Version 1.03:
New version 1.03 of DT2UTC, with 2 functions, DT2UTC and UTC2DT, now it is using settings from register DB to convert.