04-01-2016 09:51 AM
I am using DateTimePicker .NET controls to allow users to select a Timestamp. This works great and you simply read the "Value" property of the .NET control into a Timestamp. The problem I am having is reversing this process. I am trying to set the Value property using a Timestamp. I always get the error, "The datatype of the variant is not compatible with the data type wired to the type input." I have tried To Variant, To .NET Object, and other conversions but I can't seem to get it right. What is the Variant that corresponds to the Value property? And how do I convert a LV Timestamp into this Variant?
Solved! Go to Solution.
04-01-2016 10:14 AM
I am able to set the Date Time Picker value with a time stamp. Could you post your VI?
04-01-2016 10:22 AM
Thanks for the example. I had actually just discovered my problem prior to seeing your post. Turns out I was using the wrong Value property node. I was using the one from the LV control and not from the System.Windows.Forms.DateTimePicker class. I switched to the class specific one and it is all working great now. As usual, it ended up that I was just doing something stupid. Thanks for the help.