Difference between revisions of "Documentation/How Tos/Calc: HOUR function"

From Apache OpenOffice Wiki
Jump to: navigation, search
(Initial content)
 
Line 3: Line 3:
 
== HOUR ==
 
== HOUR ==
 
Returns the hour of a given time.  
 
Returns the hour of a given time.  
 
  
 
=== Syntax: ===
 
=== Syntax: ===
Line 10: Line 9:
  
 
: <tt>'''time'''</tt> may be text or a date-time serial number.
 
: <tt>'''time'''</tt> may be text or a date-time serial number.
 
  
 
=== Example: ===
 
=== Example: ===
Line 18: Line 16:
 
<tt>'''HOUR(A1)'''</tt>
 
<tt>'''HOUR(A1)'''</tt>
 
: where cell A1 contains the time <tt>'''9:25:10'''</tt> as a date-time serial number, returns <tt>'''9'''</tt>.
 
: where cell A1 contains the time <tt>'''9:25:10'''</tt> as a date-time serial number, returns <tt>'''9'''</tt>.
 
  
 
=== See also: ===
 
=== See also: ===

Revision as of 12:53, 18 January 2008


HOUR

Returns the hour of a given time.

Syntax:

HOUR(time)

returns the hour of time as a number, 0 - 23.
time may be text or a date-time serial number.

Example:

HOUR("6 January 2008 21:30:15")

returns 21.

HOUR(A1)

where cell A1 contains the time 9:25:10 as a date-time serial number, returns 9.

See also:

YEAR, MONTH, DAY, WEEKDAY, MINUTE, SECOND

Date & Time functions

Date & Time overview

Personal tools