Hi all, i have a problem with the Navision duration variable. i have 2 variables datatype date time and 1 variable datatype Duration. Now i only proceed with the following varDuration = enddatetime- startdatetime where enddatetime = 15/11/12 11:50:00 AM startdatetime = 24/10/12 01:50:00 PM i have 2 pc's the first give me the result 21 days 23 hours which is wrong and the second gives me the result 21 days 22 hours which is correct. Why i have this problem, how can i fix this.
Any help please?????
0
Comments
Datetime is a not so nice datatype. Datetime will be adjusted regarding the TZ settings of the machine the client is running on. Since your interval crosses the daylight saving time boundary I would assume that one pc is set up to use DST and one is not. There is no real workaround to avoid these effects, because the datetime value generated/entered at runtime depends on where the code is running. If everything has the right TZ, then your duration shouldn't have this problem. Never seen a big enough setup without wrong TZs, though.
with best regards
Jens
thank you very much for your help. Although the DTC was enabled both of the machines the problem was that the one pc had the UTC time zone settings (correct one) and the other one the GMT. Thanks again for your help.
Kind regards,
Bill