Difference between revisions of "Documentation/How Tos/Calc: TIME function"
From Apache OpenOffice Wiki
< Documentation | How Tos
(Initial content) |
m |
||
Line 3: | Line 3: | ||
== TIME == | == TIME == | ||
returns the time, given hours, minutes and seconds. | returns the time, given hours, minutes and seconds. | ||
− | |||
=== Syntax: === | === Syntax: === | ||
Line 11: | Line 10: | ||
: If <tt>'''hours'''</tt>, <tt>'''minutes'''</tt> and <tt>'''seconds'''</tt> are not within range for a valid time, the time will 'roll over', as shown below. | : If <tt>'''hours'''</tt>, <tt>'''minutes'''</tt> and <tt>'''seconds'''</tt> are not within range for a valid time, the time will 'roll over', as shown below. | ||
− | |||
=== Example: === | === Example: === | ||
Line 19: | Line 17: | ||
<tt>'''TIME(9; 31; 75)'''</tt> | <tt>'''TIME(9; 31; 75)'''</tt> | ||
: returns 9:32:15 am - the time rolls over, as there are only 60 seconds in a minute. | : returns 9:32:15 am - the time rolls over, as there are only 60 seconds in a minute. | ||
− | |||
=== See also: === | === See also: === |
Revision as of 10:01, 16 January 2008
TIME
returns the time, given hours, minutes and seconds.
Syntax:
TIME(hours; minutes; seconds)
- returns the time, expressed as a date-time serial number. hours, minutes and seconds are integers.
- If hours, minutes and seconds are not within range for a valid time, the time will 'roll over', as shown below.
Example:
TIME(9; 31; 20)
- returns the time 9:31:20 am (as a date-time serial number).
TIME(9; 31; 75)
- returns 9:32:15 am - the time rolls over, as there are only 60 seconds in a minute.