Hi
as part of the hstouch i am building, i am using 2 virtual devices to select a time (hours:min) and to be able to schedule an event to perform action.
but something changed during the few upgrades of HS3 i imagine.
the value date returns also the date even if i want only the time.
Sub Main(Parm As Object)
Dim EvRef As Integer
Dim EvTime As date
Dim DevHours As Integer
Dim DevMins As Integer
Dim DevRefH As Integer
Dim DevRefM As Integer
DevRefH = hs.GetDeviceRef("V97")
DevRefM = hs.GetDeviceRef("V98")
DevHours = hs.DeviceValue(DevRefH)
DevMins = hs.DeviceValue(DevRefM)
EvTime = ((DevHours) &":"& (DevMins))
hs.writelog ("Test9",EvTime)
End Sub
i get this in the log:
Test9 9/7/2015 12:05:00 PM
i selected 12 in the virtual device for hours and 05 for the virtual device for minutes.
but i get also the date in the value and i need only the time.
anyone knows what i am missing?
thanks
as part of the hstouch i am building, i am using 2 virtual devices to select a time (hours:min) and to be able to schedule an event to perform action.
but something changed during the few upgrades of HS3 i imagine.
the value date returns also the date even if i want only the time.
Sub Main(Parm As Object)
Dim EvRef As Integer
Dim EvTime As date
Dim DevHours As Integer
Dim DevMins As Integer
Dim DevRefH As Integer
Dim DevRefM As Integer
DevRefH = hs.GetDeviceRef("V97")
DevRefM = hs.GetDeviceRef("V98")
DevHours = hs.DeviceValue(DevRefH)
DevMins = hs.DeviceValue(DevRefM)
EvTime = ((DevHours) &":"& (DevMins))
hs.writelog ("Test9",EvTime)
End Sub
i get this in the log:
Test9 9/7/2015 12:05:00 PM
i selected 12 in the virtual device for hours and 05 for the virtual device for minutes.
but i get also the date in the value and i need only the time.
anyone knows what i am missing?
thanks
Comment