web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Blogs / viko's NAV blog / DT2DATE function bug when u...

DT2DATE function bug when using it for DT2DATE(CURRENTDATETIME) conversion while having NAV Server Time Zone different from machine

viko Profile Picture viko

I've noticed strange problem which basically resulted in following:

DT2DATE(CURRENTDATETIME) wasn't returning the same date that is in CURRENTDATETIME function result.

In my particular case Machine was running under AET (Australian Eastern Time), and NAV Server option "Services Default Time Zone" was equal "UTC".

Time conditions at runtime:

Machine Time (AET) = 11/02/2016 10:00

UTC time = 10/02/2016 23:00

Results:

CURRENTDATETIME = 11/02/2016 10:00

DT2DATE(CURRENTDATETIME) = 10/02/2016

Setting "Services Default Time Zone" to "Server Time Zone" resolved this problem.

Comments

*This post is locked for comments