Compartir a través de


SEC( ) Function

Returns the seconds portion from a DateTime expression.

SEC(tExpression)

Return Values

Numeric

Parameters

  • tExpression
    Specifies the DateTime expression from which SEC( ) returns the second. If tExpression contains only a date and not a time, Visual FoxPro adds the default time of midnight (12:00:00 A.M.) to tExpression.

Example

The following example displays the second portion of the current time and the second portion of a specific time.

CLEAR
? SEC(DATETIME( ))
? SEC({^1998-08-21 10:42:16am})  && Displays 16

See Also

DATETIME( ) | HOUR( ) | MINUTE( ) | SET SECONDS