DateTime Datatype bespoke field on table

abz_tecmanabz_tecman Member Posts: 27
edited 2014-05-22 in NAV Three Tier
I got a bit of a dilemma chapz

Scenario 1:

I have a bespoke table in NAV which includes a datetime field, when a record is updated/created the datetime field is populated with the current time. In this scenario if the record is created/updated the field is updated. When I compare the same record in both NAV and SQL, the SQL table holds the correct time stamp of i.e. 1230hrs but in NAV the field in the same table/record shows a time of one hour ahead 1330hrs.

When comparing records before and after the beginning of Daylight Savings Time 30/03/2014, the records prior to this date match, but after this date, there is inconsistency.

Note that entries created/updated here are done using processes external to NAV.


Scenario 2:

I create a sales order, on the header table there is bespoke datetime field which logs the creation date and time. I then compare the times logged and it correctly displayed the time as 1230hrs, but in SQL the same record logged a time of 1130hrs

Note that scenrio 2 was done in NAV.

So I am confused. can anyone help?

Thanks
Abz

Comments

  • kinekine Member Posts: 12,562
    Datetime is saved in sql as GMT. Nav is automatically display the field in local time. This is the difference for you. Because you are now +1, all is shifted. If you want save data to sql directly, you need to save them in GMT.
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.