Functions.TString Method (Real8)
Convert a specified number of seconds to a time string.
XSharp.Core (in XSharp.Core.dll) Version: 2.16
Syntax Request Example
nSeconds AS REAL8
) AS STRING
public static string TString(
- Type: Real8
The number of seconds to convert.
The format of the return value is dependent on several functions, including SetAMPM(), SetAMExt(), SetPMExt(), and SetInternational(), which you can refer to for more information.
is greater than 86,400 (the number of seconds in one day), the number of seconds past the whole number of days is returned (see the second example below).
TString() converts a specified number of seconds to a time string. Days() is a related function that is particularly useful when nSeconds is greater than 86,400, since it returns the number of full days in a given number of seconds.
This example uses TString() on a number less than 86,400.
The initial settings define a 12-hour time format with " AM" and " PM" as the morning and evening extensions:
This example passes 303,600 to TString(). Since 303,600 seconds is equal to 3 days, 11 hours, and 20 minutes, TString() only returns the time past the whole 3 days.
The initial settings define a 24-hour format with no morning or evening extension: