18.01.2013 Views

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong> <strong>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong><br />

DateValue<br />

Description Returns a Variant of subtype Date<br />

Usage dateVal = DateValue(date)<br />

Arguments date<br />

Date is an expression representing a date, time or both, in the range January 1, 100 to<br />

December 31, 9999.<br />

Return A date value<br />

Remarks Time in<strong>for</strong>mation in date is not returned. However, if date includes invalid time in<strong>for</strong>mation (such<br />

as "89:98"), a runtime error occurs. DateValue is internationally aware and uses the system<br />

locale setting on the local machine to recognize the order of a date with only numbers and a<br />

separator. If date is a string that includes only numbers separated by valid date separators,<br />

DateValue also recognizes unambiguous dates that contain month names, either in long or<br />

abbreviated <strong>for</strong>m. For example, in addition to recognizing 12/30/1991 and 12/30/91, DateValue<br />

also recognizes December 30, 1991 and Dec 30, 1991. If the year part of date is omitted,<br />

DateValue uses the current year from your computer's system date.<br />

See Also Date, DateSerial, Day, Month, Now, TimeSerial, TimeValue, Weekday, Year<br />

Example The following example uses the DateValue function to convert a string to a date. You can also<br />

use date a date to a Variant variable, <strong>for</strong> example, MyDate = #9/11/63#.<br />

Dim MyDate<br />

MyDate = DateValue("September 11, 1963") ' Return a date 9/11/1963<br />

128 <strong>InduSoft</strong>, Ltd.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!