LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Calendar ActiveX Control

I'm using the Microsoft Calendar ActiveX Control to allow the user to select a date. I would like the value selected to update a control on another panel. I've created an ActiveX Controller for the control with the default prefix MSACAL. I'm then using the MSACAL_IcalendarGetValue to obtain the value selected by the user. This value is returned as a VARIANT. I follow this by using the function CA_VariantGetDate which saves the VARIANT value as a DATE value.

The difficulty I'm having is in the conversion of the value stored in my DATE variable back to a formatted date to be displayed at a later time.

Any input on this would be much appreciated.

Regards,
James.
0 Kudos
Message 1 of 6
(3,583 Views)
Hello,
I am not sure what exactly you are asking. Are you looking for a function to convert the DATE type back to VARIANT type, so that you can pass it back to the ActiveX Control?? If so, you can use CA_VariantSetDate function. I hope this helps.

Mika Fukuchi
Applications Engineer
National Instruments
0 Kudos
Message 2 of 6
(3,583 Views)
Mika,

What I am looking to do is to take the VARIANT returned from the Calendar ActiveX control and put it into a string control as a date formatted in dd/mm/yyyy format.

Thanks for your input
James
0 Kudos
Message 3 of 6
(3,583 Views)
From the Advanced >> Data Manipulation >> Variant palette, look at Variant to Data or Variant to Flattened String.
0 Kudos
Message 4 of 6
(3,583 Views)
Thanks for your help!
0 Kudos
Message 5 of 6
(3,583 Views)
Sorry: I got my forums confused. I gave a LabView answer to a CVI question. Oops.
0 Kudos
Message 6 of 6
(3,583 Views)