Click or drag to resize

Secs Function

X#
Return a time as the number of seconds that have elapsed since midnight.

Namespace:  XSharp.Core
Assembly:  XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax
 FUNCTION Secs(
	cTime AS STRING
) AS DWORD
Request Example View Source

Parameters

cTime
Type: String
The time to convert to seconds, in the form hh:mO:ss.

Return Value

Type: DWord
The number of seconds from midnight to the time specified.
The return value cannot be greater than 86,400, the number of seconds in a day.
Remarks
Examples
This example displays the number of seconds that have passed since midnight:
X#
1? Secs(Time())
This example specifies a time greater than 24 hours:
X#
1? Secs("25:05:09")            // 90309
See Also