Difference between revisions of "DAYS()"

From Lianjapedia
Jump to: navigation, search
m (1 revision)
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
 
  
 
==Syntax==
 
==Syntax==
 
DAYS(<expN>)
 
DAYS(<expN>)
 
  
 
==See Also==
 
==See Also==
[[AMPM()]], [[ELAPTIME()]], [[HOURS()]], [[MINUTES()]], [[SECONDS()]], [[SECS()]], [[SET CLOCK]], [[SET CLOCKRATE]], [[TIME()]], [[TSTRING()]], [[VALIDTIME()]]
+
[[AMPM()]], [[ELAPTIME()]], [[HOURS()]], [[MINUTES()]], [[SECONDS()]], [[SECS()]], [[TIME()]], [[TSTRING()]], [[VALIDTIME()]]
 
+
  
 
==Description==
 
==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.
 
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==
 
==Example==
Line 25: Line 21:
 
</code>
 
</code>
  
 
==Products==
 
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]]

Revision as of 06:34, 10 February 2012

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