Siebel VB Language Reference > Methods Reference for Siebel VB > Date and Time Methods >

Extract Hour From Date-Time Value Method


The Extract Hour From Date-Time Value method returns the hour component of a date and time value. The return value is an integer variable type in the range of 0 through 23. Note the following:

  • If the return value is null, then this method returns a null variable type. For more information, see Variants.
  • The value in the time argument can be of any type, including string.
  • The value in the time argument is a double-precision value:
    • The numbers to the left of the decimal point denote the date.
    • The decimal value denotes the time from 0 to 0.99999.

You can use the Convert String to Time method to get the correct value for a specific time.

Format

Hour(time)

The argument that this method uses is the same as the argument that the Convert String to Time method uses. For more information, see Convert String to Time Method.

If the value that the minute argument contains does not evaluate to a date and time or to a time value, then this method returns 0 (zero). For example:

  • The value 13:26 or the 1:45:12 PM returns a valid result.
  • The value 1326 returns a 0.
Siebel VB Language Reference Copyright © 2015, Oracle and/or its affiliates. All rights reserved. Legal Notices.