Method: CreateTime for DataPlugin
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Methods > Method: CreateTime for DataPlugin
Method: CreateTime for DataPlugin
Creates a time value. You can assign this time value to a value in a time channel or to a property.
Set oUsiTimeDisp = Object.CreateTime(Year, Month, Day, Hour, Minute, Second, Millisecond, Microsecond, Nanosecond)
| Object | DataPlugin Object with this method |
| Year | Variant Specifies the year. |
| Month | Variant Specifies the month. |
| Day | Variant Specifies the day. |
| Hour | Variant Specifies the hour. |
| Minute | Variant Specifies the minute. |
| Second | Variant Specifies the second. |
| Millisecond | Variant Optional in USI 1.5 and later |
| Microsecond | Variant Optional in USI 1.5 and later |
| Nanosecond | Variant Optional in USI 1.5 and later |
| oUsiTimeDisp | UsiTimeDisp Returned object |
| Note You can use VBS date/time functions instead of CreateTime. However, milliseconds, microseconds, and nanoseconds are not supported with these VBS functions. |
The following example creates the root property Time and assigns the time value 06/17/2004 10:00:00 to this property.
Call Root.Properties.Add("Time", CreateTime(2004,6,17,10,0,0,0,0,0))