secsminshours(
TIME
)

The secsminshours( function this converts a time (number of seconds) into an approximate text value.

Parameters

This function has one parameter:

time – the number of seconds.

Description

This converts a time (number of seconds) into an approximate text value. The time is rounded to the nearest unit level: seconds, minutes, hours, or days. For example 3 will be 3 converted to seconds, 63 will be converted to 1 minute, 3700 will be converted to 1 hour, etc.

``````secsminshours(1200) ☞ 20 minutes
secsminshours(12000) ☞ 3 hours
secsminshours(1200000) ☞ 14 days
``````

Note: This function is equivalent to:

``````?(time<60,pattern(time,"# second~"),?(time<3600,pattern(time/60,"# minute~"),?((time<3600*24),
pattern(time/3600,"# hour~"),pattern(time/86400,"# day~"))))
``````

• info("milliseconds") -- returns the number of milliseconds (1/1000th second) since the system started up.
• info("tickcount") -- returns the number of ticks (1/60th second) since the system started up.
• longtimestr( -- converts a number to text in am/pm time format, including seconds.
• now( -- returns the current time (number of seconds since midnight).
• regulartime( -- extracts a regular time (seconds since midnight) from a superdate.
• superdate( -- converts a regular date and a regular time into a superdate.
• superdatepattern( -- converts a number containing a superdate to text, allowing you to specify the patterns for both the date and the time conversion to text.
• superdatesecondsstr( -- converts a number containing a superdate to text, including the seconds.
• superdatestr( -- converts a number containing a superdate (date + time) to text.
• supernow( -- returns the number representing the current date and time as a superdate.
• texttimedifference( -- allows time math to be performed on text values.
• texttimeinterval( -- allows time math to be performed on text values.
• time( -- converts text into a number representing a time.
• time24( -- takes a time and makes sure it falls within a 24 hour period.
• timedifference( -- calculates the difference between two times. It works correctly even if the interval between the two times crosses over midnight.
• timeinterval( -- calculates the time interval between two times. It works correctly even if the interval between the two times crosses over midnight.
• timepattern( -- converts a number representing a time into text. The function uses a pattern to control how the time is formatted.
• timestr( -- converts a number to text in am/pm time format.

History

 Version Status Notes 10.0 No Change Carried over from Panorama 6.0.