Hi!
I wrote an automation server in C# that is used by Navision. One method takes a DateTime parameter, but this is displayed as Date in Navision. I am not able to call the method using e.g. CURRENTDATETIME as a value, the compiler starts crying that he wants a Date.
c# code
public class whatever{
// ...
public void AddDateTime(DateTime value){
}
Navision code, unable to compile
create(whatever);
whatever.AddDateTime(CURRENTDATETIME)
Navision code, works
create(whatever);
whatever.AddDateTime(TODAY)
This sucks, as I need the whole information from CURRENTDATETIME to be passed to the automation server. Does anyone have an idea what I did wrong?
regards
Mog
Comments
If the automation object is only used by navision you could try a workaround either by passing date and time separately or passing the value as a text string.
Good luck.
Thomas
COMs doesn't support DateTime variables, but does support Variant. The solution below should work.
c# code
C/Side code
Good luck!