DateAndTime.Second(DateTime) 메서드

정의

초를 나타내는 0에서 59까지의 정수 값을 반환합니다.

public:
 static int Second(DateTime TimeValue);
public static int Second (DateTime TimeValue);
static member Second : DateTime -> int
Public Function Second (TimeValue As DateTime) As Integer

매개 변수

TimeValue
DateTime

필수 요소. 초를 추출할 Date 값입니다.

반환

초를 나타내는 0에서 59까지의 정수 값입니다.

예제

다음 예제에서는 함수를 Second 사용하여 지정된 시간에서 분 중 두 번째를 가져옵니다. 개발 환경에서 시간 리터럴은 코드의 로캘 설정을 사용하여 짧은 시간 형식으로 표시됩니다.

Dim thisTime As Date
Dim thisSecond As Integer
thisTime = #4:35:17 PM#
thisSecond = Second(thisTime)
' thisSecond now contains 17.

설명

인수에 대해 를 호출 DatePart 하고 지정하여 분 중 두 번째를 Interval 가져올 수도 있습니다DateInterval.Second.

적용 대상

추가 정보