Hello!
We created a code first item field with date type DateTime and editor DateTimeEditor. The database shows the column data type as nvarchar(max), which seems completely overkill. Is this intended behaviour or did we do something wrong?
Here is the code snippet we used to create the field:
[Group("Project data")]
[Field("LastModified", typeof(Dynamicweb.Content.Items.Editors.DateTimeEditor))]
[Name("LastModified")]
public DateTime? LastModified { get; set; }
The data is imported by an automated process and the users will not be able to modify it, only view it. An alternative would be to make this a string field instead and then string convert the DateTime during the import, e.g. "2019-12-04 11:16:21". Would that be a better option?
Kind regards,
Niklas