NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

HxLink DID NOT INITIALIZE

DateValue Function

Returns a DateTime.

DateValue(datetime)

The required datetime argument is normally a string expression representing a date from January 1, 100 through December 31, 9999. However, datetime can also be any expression that can represent a date, a time, or both a date and a time, in that range.

Remarks

If datetime is a string that includes only numbers separated by valid date separators, DateValue recognizes the order for month, day, and year according to the Short Date format you specified for your system. DateValue also recognizes unambiguous dates that contain month names, either in long or abbreviated form. For example, in addition to recognizing 12/30/1991 and 12/30/91, DateValue also recognizes December 30, 1991 and Dec 30, 1991.

If the year part of datetime is omitted, DateValue uses the current year from your computer's system date.

If the datetime argument includes time information, DateValue doesn't return it. However, if datetime includes invalid time information (such as "89:98"), an error occurs.

Note For datetime, if the Calendar property setting is Gregorian, the supplied date must be Gregorian. If the calendar is Hijri, the supplied date must be Hijri. If the supplied date is Hijri, the argument datetime is a String representing a date from 1/1/100 (Gregorian Aug 2, 718) through 4/3/9666 (Gregorian Dec 31, 9999).

See Also

Example

Calendar Property | Date Function | Date Statement | DateSerial Function | Day Function | Month Function | Now Function | TimeSerial Function | TimeValue Function | Weekday Function | Year Function