Hi,
Using the Code First approch I have made an item with an itemfield of type DateTime. The field should have todays date as the default value. Therefore I have added this line of code "[DefaultValue("@Code(System.DateTime.Now)")]". But still new items based on the itemtype does not get todays date as the default date in the field ("Tidspunkt"). Here is my code:
[Field("Tidspunkt", typeof(DateTimeEditor))]
[Group("E-mail notifikation")]
[DefaultValue("@Code(System.DateTime.Now)")]
public DateTime NotificationTime { get; set; }
Why does this code not work? Any ideas?