Click or drag to resize

Sec Function

X#
Returns the seconds portion from a DateTime expression.

Namespace:  XSharp.VFP
Assembly:  XSharp.VFP (in XSharp.VFP.dll) Version: 2.19
Syntax
 FUNCTION Sec(
	tExpression AS DateTime
) AS LONG
Request Example View Source

Parameters

tExpression
Type: DateTime
Specifies the DateTime expression from which SEC( ) returns the second. If tExpression contains only a date and not a time, X# adds a default time of 12:00:00 AM (if SET HOURS is 12) or 00:00:00 (if SET HOURS is 24) to tExpression to produce a valid DateTime value.

Return Value

Type: Long
Numeric
Examples
X#
1CLEAR
2? SEC(DateTime( ))
3? SEC({^2004-02-16 10:42:16AM})  // Displays 16
See Also