Click or drag to resize

Days Function

X#
Convert a specified number of seconds to days.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.21
Syntax
 FUNCTION Days(
	nSeconds AS REAL8
) AS LONG
Request Example View Source

Parameters

nSeconds
Type: Double
The number of seconds to convert to days.

Return Value

Type: Long
The number of days to the nearest day.
Remarks
Days() converts a given number of seconds to the whole number of days.
The remainder under 24 hours can be obtained by the TString() function (see example below).
Examples
This example uses Days() and TString() to show that 300,000 is equal to 3 days, 11 hours, and 20 minutes:
X#
1? Days(300000)                // 3
2? TString(300000)            // 11:20:00
See Also