FUNCTIONS CORE

Secs()

Calculate the number of seconds from a time string

Syntax

Signature
Secs( cTime | dDateTime ) --> nSeconds

Arguments

cTime | dDateTime

Example

Secs.prg
PROCEDURE Main()

   Check( 'Secs( "01:01:01" ) ', Secs( "01:01:01" ), 3661 )

RETURN

STATIC PROCEDURE Check( cTitle, xResult, xExpected )

   QOut( cTitle + IIF( xResult == xExpected, "OK", "ERROR" ) )

RETURN

Output

Secs( "01:01:01" ) OK