Insert date Answered Written by Samir Waikar August 08, 2018 12:12 2 Hi , I have a blank field and want to have current date and time in it. Can anyone tell me. Was this article helpful? 0 out of 0 found this helpful Yes No
Comments
2 comments
Hi Samir,
Set the field datatype to Date. Then add a C# script rule to getdate and assign it to the field. See script below.
using System;
DateTime thisDay = DateTime.Today;
Context.Field("Field").Text = thisDay.ToString("d");
Thanks collins.
Please sign in to leave a comment.