Bookshelf Home | Contents | Index | PDF |
Siebel VB Language Reference > VB Language Reference > DateValue FunctionThis standard VB function returns a date value for the string specified. SyntaxReturnsA variant of vartype 7 (date) that represents a date from January 1, 100, through December 31, 9999, where January 1, 1900, is 2. UsageDateValue accepts several different string representations for a date. It makes use of the operating system's international settings for resolving purely numeric dates. In contrast to the CVDate function (read CVDate Function), the argument to the DateValue function must be in a valid date format. If given a time in acceptable format, DateValue changes the time to 12:00:00 AM regardless of the value given. If given a number that is not an acceptable date or time format, DateValue returns a Type Mismatch error. For ways to display the desired result of a date conversion, read Format Function. ExampleThis example displays the date for one week from the date entered by the user. Sub Button_Click See AlsoDateSerial Function |
Siebel VB Language Reference |