Hi,
i have a problem reading SQL Datetime in Navision.
My task is to select from another database (non-navision) recordsets and overtake them some of them into a navision table.
This works fine for varchar fields.
But there are two Datetime fields in the table that can not transferred. I get the error message, that this data type is not supported by C/SIDE.
I tried to transform the datetime field with sql-function DATEPART into its elements, but i had no success. Even if i only try to get one element of the datetime (e.g. year: DATEPART(yyyy,[datetime]) i still get the error message mentioned above.
Has anyone ever imported Datetime fields in navision and can give me a hint?
Thanks
Michael
0
Comments
You may need to use CAST/CONVERT to translate DateTime into separate Date and Time fields.
I paste some code where you can see what i do:
Here i should get the year of the datetime field, but i get always the error message, that i mentioned in my first post.
It might seem a litte bit long-winded, but i tried to make it as elementar as possible.
Greetz
Michael
This should solve your problem. I had same issue with decimal datatype and I casted to float and it resolved the issue.
Independent Consultant/Developer
blog: https://dynamicsuser.net/nav/b/ara3n