Difference between revisions of "DAYS()"
Yvonnemilne (Talk | contribs) |
Helengeorge (Talk | contribs) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
==Purpose== | ==Purpose== | ||
Function to return the number of whole days in a period expressed in seconds | Function to return the number of whole days in a period expressed in seconds | ||
Line 25: | Line 21: | ||
m_secs=357812 | m_secs=357812 | ||
? "The period was "+alltrim(str(days(m->m_secs)))+; | ? "The period was "+alltrim(str(days(m->m_secs)))+; | ||
− | " days and "+tstring(m->m_secs) +" hours" | + | " days and "+tstring(m->m_secs) +" hours" |
The period was 4 days and 03:23:32 hours | The period was 4 days and 03:23:32 hours | ||
</code> | </code> | ||
Line 31: | Line 27: | ||
==Products== | ==Products== | ||
− | Recital | + | Recital Server, Recital |
[[Category:Documentation]] | [[Category:Documentation]] | ||
[[Category:Functions]] | [[Category:Functions]] | ||
[[Category:Date and Time Data]] | [[Category:Date and Time Data]] | ||
[[Category:Date and Time Data Functions]] | [[Category:Date and Time Data Functions]] |
Latest revision as of 16:45, 27 November 2009
Purpose
Function to return the number of whole days in a period expressed in seconds
Syntax
DAYS(<expN>)
See Also
AMPM(), ELAPTIME(), HOURS(), MINUTES(), SECONDS(), SECS(), SET CLOCK, SET CLOCKRATE, TIME(), TSTRING(), VALIDTIME()
Description
The DAYS() function returns the number of whole days in a specified period expressed in seconds from the given <expN>. The DAYS() function will return a value of zero if <expN> is less than 43200 (12 hours). For values between 43200 and 129599 (35 hours, 59 minutes, 59 seconds), DAYS() will return 1. For values of 36 hours to 59 hours, 59 minutes, 59 seconds the DAYS() function will return 2. This pattern continues as the number of seconds gets larger. The TSTRING() function can be used to return the duration of any remaining portions of days.
Example
? days(300033) 3 m_secs=357812 ? "The period was "+alltrim(str(days(m->m_secs)))+; " days and "+tstring(m->m_secs) +" hours" The period was 4 days and 03:23:32 hours
Products
Recital Server, Recital