IDTSExecutionMetrics.StartTime 屬性

定義

傳回容器開始執行的時間。 這個屬性是唯讀的。

public:
 property DateTime StartTime { DateTime get(); };
public DateTime StartTime { get; }
member this.StartTime : DateTime
Public ReadOnly Property StartTime As DateTime

屬性值

DateTime

DateTime 值,表示容器開始執行的時間。

範例

下列程式碼範例假設已建立名為的套件 pkg 。 會執行封裝,並記錄執行的開始時間、停止時間和持續時間。 在執行封裝之後,會建立變數來捕捉資訊。 pkg物件可以由繼承自的任何容器、工作或物件取代 DtsContainer ,因為會 DtsContainer 繼承 IDTSExecutionMetrics 介面。

pkg.Execute();  
DateTime dtStart = pkg.StartTime;  
DateTime dtStop = pkg.StopTime;  
int pgkDuration = pkg.ExecutionDuration;  
pkg.Execute()  
Dim dtStart As DateTime =  pkg.StartTime   
Dim dtStop As DateTime =  pkg.StopTime   
Dim pgkDuration As Integer =  pkg.ExecutionDuration  

適用於