Package.InstallDate | installDate property

Applies to Windows Phone only

Windows Phone only. Gets the date the application package was installed on the user's phone.

Syntax


public:
property DateTime InstallDate { 
   DateTime get();
}

Property value

Type: Date [JavaScript] | System.DateTimeOffset [.NET] | Windows::Foundation::DateTime [C++]

The date the application package was installed on the user's phone.

Remarks

Windows Phone 8

If you acquire the Package instance by using the Windows.ApplicationModel.Package.Current property, getting the InstallDate property raises an InvalidCastException. If you want to get the InstallDate property, acquire the Package instance by using the Windows.Phone.Management.Deployment.InstallationManager.FindPackagesForCurrentPublisher method.



            using Windows.ApplicationModel;
            . . .
            IEnumerable<Package> packages = Windows.Phone.Management.Deployment.InstallationManager.FindPackagesForCurrentPublisher();
            Package package = packages.First();
            DateTimeOffset packageInstallDate = package.InstallDate;
            // Display the result in a TextBlock control.
            tbInstallDate.Text = packageInstallDate.ToString("D");


Requirements

Minimum supported client

None supported

Minimum supported server

None supported

Minimum supported phone

Windows Phone 8

Namespace

Windows.ApplicationModel
Windows::ApplicationModel [C++]

Metadata

Windows.winmd

See also

Package

 

 

Show:
© 2014 Microsoft