DAYS()
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