Page 1 of 1

How to set userdefined timevalue from vbscript?

Posted: Sun Jan 11, 2009 12:19 pm
by alibaba
Hi there

I defined a userdefined time value-property in a device. I want to write a certain time to it using vbscript, but I don't know the correct format and everything I tried lead to an error.
Does anybody have information about the correct format?

Thanks -Alex-

Re: How to set userdefined timevalue from vbscript?

Posted: Mon Jan 12, 2009 9:17 am
by ScottBot
Here's an example of setting just the time (hour, minute, second) of a time Property.
SetPropertyValue "Null Device.MyTimeProperty", "Hour=09, Minute=45, Second=21"
Here's another example of setting a time Property without seconds.
SetPropertyValue "Null Device.MyTimeProperty", "Hour=09, Minute=45"
An easy way to figure out the exact format is to go ahead and set the value through the UI in HouseBot. Then click on the Property and inspect the 'Value' field to see how the server formatted it.

Re: How to set userdefined timevalue from vbscript?

Posted: Mon Jan 12, 2009 9:31 am
by alibaba
Hi Scott
Thanks, using this format I was successful!
Best regards
-Alex-