Click or drag to resize
IReadOnlyPropertyAsDateTime Method (DateTime)
Value converted to a DateTime in the local timezone using the default value if null. If the value cannot be converted, an exception is thrown

Namespace: Innovator.Client
Assembly: Innovator.Client (in Innovator.Client.dll) Version: 2016.1.15.1759 (2016.01.15.1759)
Syntax
DateTime AsDateTime(
	DateTime defaultValue
)

Parameters

defaultValue
Type: SystemDateTime

Return Value

Type: DateTime
Examples
C#
// If the part was created after 2016-01-01, put the name of the creator in the description
if (comp.CreatedOn().AsDateTime(DateTime.MaxValue) > new DateTime(2016, 1, 1))
{
    edits.Property("description").Set("Created by: " + comp.CreatedById().KeyedName().Value);
}
See Also