Bookshelf Home | Contents | Index | PDF |
Siebel VB Language Reference > VB Language Reference > CVDate FunctionThis standard VB function converts an expression to the data type variant of type date. SyntaxReturnsThe value of expression expressed as a variant of vartype 7 (date). UsageCVDate accepts both string and numeric values. The CVDate function returns a variant of vartype 7 (date) that represents a date from January 1, 100, through December 31, 9999. A value of 2 represents January 1, 1900. Times are represented as fractional days. CVDate converts the time portion of a date expression if one is included as part of the expression, or if the time expression is the only argument. For ways to display the desired result of a date conversion, read Format Function. When comparing dates, they must be formatted consistently. This can be achieved by using CVDate to convert both expressions before comparing them. ExampleThis example displays the date for one week from the date entered by the user. Sub Button_Click See AlsoAsc Function |
Siebel VB Language Reference |