Promotic
WikipediaLinkedInYoutubeTwitterFacebook

TimeValue - function of language VBScript

Description:
Returns a value of the Date type containing the time.
Syntax:
Date TimeValue(Date time)
Parameters:
time(Date) A time from 0:00:00 (12:00:00 A.M.) to 23:59:59 (11:59:59 P.M.)
Note:
If the time argument contains date information, then function does not return the date information. However, if time includes invalid date information, then an error occurs.
You can enter valid times using a 12-hour or 24-hour clock. For example, "2:24PM" and "14:24" are both valid time arguments.

For converting String values to Date it is better to use the Pm.ScanDate method.
Example:
VBScriptSelect and copy to clipboard

Dim tTime
tTime = TimeValue("4:35:17 PM")   ' tTime contains 4:35:17 PM
PROMOTIC 9.0.17 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice