Description
The Updated
property of the Package
class provides the timestamp of when the package entry was last updated. This property is useful for tracking changes or updates made to the package on the backend. If the Updated
timestamps differ between packages, it indicates that there has been an update on the backend.
Usage
To access the Updated
property, you need to have an instance of the Package
class. You can then retrieve the last updated timestamp as a DateTimeOffset
object.
Example
// Assuming 'package' is an instance of Sandbox.Package
DateTimeOffset lastUpdated = package.Updated;
// Display the last updated time
string formattedDate = lastUpdated.ToString("yyyy-MM-dd HH:mm:ss");
// Use the formattedDate as needed, e.g., display in UI