Options

Navision Date-Time Question

varavvasvaravvas Member Posts: 2
Greetings,

I am developing a custom application in visual studio (c#) and I am having trouble translating the Navision decimal date-time format to regular date-time (in table [$Prod_ Order Line], field [Starting Date-Time]).
I would appreciate it if anyone posts a formula to convert the decimal number to date-time format.

Thanks,

Stav.

Comments

  • kinekine Member Posts: 12,562
    Which version of NAV you are using? It seems like some old. In newer versions there is datetime type and it is saved as datetime on SQL. But older versions used the decimal (or integer?) to represent the date and time (and this is still used in some tables from older versions like Prod. Order Line). How to find out the meaning:

    You can enter into some test record value 0 to see what will be showed in NAV. After that you can enter some value like 100 to see the result in NAV. after that you can do some more tests (like value 0.1 or 1.1 etc.) and it will show you how you can transform the decimal into date and time (The integer part will be count of days from some base date and the decimal part will be part of day - it means .5 will be 12:00 and 0.999999 will be right before midnight).
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
Sign In or Register to comment.