Bookshelf Home | Contents | Index | PDF |
Siebel VB Language Reference > VB Language Reference > Hour FunctionThis standard VB function returns the hour-of-day component (0-23) of a date-time value. SyntaxReturnsIf the expression evaluates to a date-time or time value, the hour component of that value; otherwise 0. UsageTime can be any type, including string, and the Hour function attempts to convert time to a date value. The return value is a variant of vartype 2 (integer). If the value of time is Null, a variant of vartype 1 (null) is returned. For Hour to function without an error, the values passed to it must be in some form that can be interpreted as a time or date-time value. Thus, 13:26, or 1:45:12 PM returns valid results, but 1326 returns a 0. Time is a double-precision value. The numbers to the left of the decimal point denote the date and the decimal value denotes the time (from 0 to 0.99999). Use the TimeValue function to obtain the correct value for a specific time. See AlsoDate Statement |
Siebel VB Language Reference |