Description
The Created
property of the Package
class provides the date and time when the package was originally created. This information is stored as a DateTimeOffset
, which includes both the date and time, as well as the offset from Coordinated Universal Time (UTC).
Usage
To access the creation date of a package, you can use the Created
property. This property is read-only and returns a DateTimeOffset
object, which can be used to determine the exact time the package was created, including the time zone offset.
Example
// Example of accessing the Created property
Package myPackage = new Package();
DateTimeOffset creationDate = myPackage.Created;
// Display the creation date
string formattedDate = creationDate.ToString("yyyy-MM-dd HH:mm:ss zzz");
// Use the formattedDate variable as needed, e.g., display in UI