Package.CreationDate Property
Gets or sets the date and time that the package was created.
Namespace: Microsoft.SqlServer.Dts.Runtime
Assembly: Microsoft.SqlServer.ManagedDTS (in microsoft.sqlserver.manageddts.dll)
Syntax
'Declaration
Public Property CreationDate As DateTime
public DateTime CreationDate { get; set; }
public:
property DateTime CreationDate {
DateTime get ();
void set (DateTime value);
}
/** @property */
public DateTime get_CreationDate ()
/** @property */
public void set_CreationDate (DateTime value)
public function get CreationDate () : DateTime
public function set CreationDate (value : DateTime)
Property Value
A DateTime object.
Remarks
The DateTime is a variant data type VT_DATE, which is a Integration Services data type of DT_Date. This value can be overwritten. For more information about VT_DATE and DT_Date, see Integration Services Data Types.
Example
The following example loads a package from the Samples folder, and then retrieves information about the package, such as its CreationDate, CreatorComputerName, and CreatorName.
static void Main(string[] args)
{
// The variable pkg points to the location
// of the ExecuteProcess package sample
// that is installed with the samples.
string pkg = @"C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx";
Application app = new Application();
Package p = app.LoadPackage(pkg, null);
//Retrieve creation information about the package.
DateTime createDate = p.CreationDate;
String computerCreated = p.CreatorComputerName;
String creatorName = p.CreatorName;
Console.WriteLine("Package creation date = " + createDate);
Console.WriteLine("Creation Computer = " + computerCreated);
Console.WriteLine("Creator Name = " + creatorName);
}
Shared Sub Main(ByVal args() As String)
' The variable pkg points to the location
' of the ExecuteProcess package sample
' that is installed with the samples.
Dim pkg As String = "C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Package Samples\ExecuteProcess Sample\ExecuteProcess\UsingExecuteProcess.dtsx"
Dim app As Application = New Application()
Dim p As Package = app.LoadPackage(pkg,Nothing)
'Retrieve creation information about the package.
Dim createDate As DateTime = p.CreationDate
Dim computerCreated As String = p.CreatorComputerName
Dim creatorName As String = p.CreatorName
Console.WriteLine("Package creation date = " + createDate)
Console.WriteLine("Creation Computer = " + computerCreated)
Console.WriteLine("Creator Name = " + creatorName)
End Sub
Sample Output:
Package creation date = 5/5/2003 5:46:00 PM
Creation Computer =
Creator Name =
Thread Safety
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Platforms
Development Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.
Target Platforms
For a list of the supported platforms, see Hardware and Software Requirements for Installing SQL Server 2005.
See Also
Reference
Package Class
Package Members
Microsoft.SqlServer.Dts.Runtime Namespace