Calendar.GetDateTime 메서드

정의

Calendar 개체의 구성 요소를 고려하여 날짜 및 시간을 작성합니다.

public:
 virtual DateTime GetDateTime() = GetDateTime;
DateTime GetDateTime();
public System.DateTimeOffset GetDateTime();
function getDateTime()
Public Function GetDateTime () As DateTimeOffset

반환

DateTime DateTimeOffset

DateTime 날짜와 시간을 나타내는 값입니다 Calendar.

설명

.NET 언어(예: C#또는 Visual Basic)를 사용하는 경우 이 단계 집합을 수행하려면 Calendar 개체와 함께 UTC(협정 세계시) 표준 시간대를 사용합니다.

  • SetToMin 또는 SetToMax다음 중 하나를 호출합니다.
  • GetDateTime을 호출하여 달력 을 .NET System.DateTime 구조체로 변환합니다.

UTC(협정 세계시) 표준 시간대를 사용하지 않으면 계산된 틱 수가 표준 시간대 오프셋으로 인해 오버플로되기 때문에 GetDateTime 이 예외를 throw합니다.

적용 대상

추가 정보