Previous Page | Next Page

Functions and CALL Routines

SECOND Function



Returns the second from a SAS time or datetime value.
Category: Date and Time

Syntax
Arguments
Details
Examples
See Also

Syntax

SECOND(time | datetime)

Arguments

time

is a numeric constant, variable, or expression with a value that represents a SAS time value.

datetime

is a numeric constant, variable, or expression with a value that represents a SAS datetime value.


Details

The SECOND function produces a numeric value that represents a specific second of the minute. The result can be any number that is >= 0 and < 60.


Examples

SAS Statements Results
time='3:19:24't;
s=second(time);
put s;


24
time='6:25:65't;
s=second(time);
put s;


5
time='3:19:60't;
s=second(time);
put s;


0


See Also

Functions:

HOUR Function

MINUTE Function

Previous Page | Next Page | Top of Page