-api-id | -api-type |
---|---|
P:Windows.Storage.IStorageItem.DateCreated |
winrt property |
Gets the date and time when the current item was created.
The date and time when the current item was created.
-
DateTime: If the date property isn't set, this value defaults to 0 which can be translated into misleading dates in different programming languages. Microsoft .NET languages do not use this type directly. In .NET it is projected as a
System.DateTimeOffset
. Each language transparently handles the conversion to the granularity and date ranges for the respective language. -
DateTimeOffset: Because the .NET
DateTimeOffset
is a structure, aDateTimeOffset
object that has been declared but not otherwise initialized contains the default values for each of its member fields. This means that itsDateTime
property is set toDateTimeOffset.MinValue
and itsOffset
property is set toTimeSpan.Zero
. In string format, theDateTimeOffset
that a file was created might be "4/18/2020 3:13:50 PM".
You should always check that this property is a real value and is not set to the default value.