Problem in Time field

I have created a table in Navision which has a field of data type Time. Now i want to transfer data from another table (not Navision table) , which has field of sql data-type DATETIME. I have written sql statement to transfer data from this table and to the Navision table which i have created. The data transfers automatically but when i run the table from Navision, it gives an error that the Time field uses invalid data for datecomponent of the DATETIME value.

Please help me in this regard. How to transfer date and time from sql to navision table successfuly. What i have to change in NAvision?

Thanks…

Best way is to create (in Navision) a new table with a time-field in it. Create some records with different times in it (also 0T) and then you check in SQL how they are filled up. This way you know what SQL has to write into the NAV time-field-table.

Yeah you are right. So now what i did, i created two fields in Navision one to store Time and other is to store Date. In sql i created two DATETIME fields also. Now it is ok. But in Navision , i want to combine both of them as decimal considering the format type etc. How can i combine? I want to combine to calculate the difference of time period with another decimal date-time field in Navision.

OK. By using Datetime mgmt codeunit [:)] Got it.