Promotic

DateValue - function of language VBScript

Description:
Returns a date without time.
Syntax:
Date DateValue(Date date)
Parameters:
date(Date) Date from 1.1.100 to 31.12.9999
Note:
If the date parameter contains time information, then function does not return it. However, if date contains invalid time information (e.g. "89:98"), then an error occurs.
If the date parameter is a string that contains only numbers separated by valid date separators, then function recognizes the order for year, month and day according to the short date format you specified for your system. Function also recognizes unambiguous dates that contain month names, either in long or abbreviated form. For example, in addition to recognizing 12/30/2023 and 12/30/23, function also recognizes December 30, 2023 and Dec 30, 2023.
If the year part is omitted in the date parameter, then function uses the current year from your computer's system date.

For conversion of String value to Date it is better to use the Pm.ScanDate method.
Example:
VBScriptSelect and copy to clipboard

Dim d
d = DateValue(date)
PROMOTIC 9.0.27 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.