Developer forum

Forum » CMS - Standard features » Default value for item type Date and Time

Default value for item type Date and Time

Hans Ravnsfjall
Reply

Hi

 

how can i set the default value (day and clock) to now, so that when you create a new item, the value will be the current clock and time. I have tried to set a default value like this: @Code(DateTime.Now) , but this doesn´t work.

 

How can I set this?

 

regards Hans


Replies

 
Vladimir
Reply

Hi Hans,

it seems this is absent in documentation - please try to write: Now 

this is should work

 

Best regards,

Vladimir

 

 

 

 

You must be logged in to post in the forum