I have a Data Extension with an "Opt in" date field and created a Smart Capture form to capture other data (Name, email etc.). I wish to populate the "Opt in" field with the current date every time the form is submitted. How can I achieve this?

2 Answers 2


I ended up using AmpScript:

  var @localDate
  set @localDate = SystemDateToLocalDate(Now())

<input value="%%=v(@localDate)=%%" />

I would do the same as you but I would also add this format function to change it to date format (from Date Time):

%%[ var @localDate set @localDate = Format(SystemDateToLocalDate(Now()),"MM/dd/yyyy")


RESULT EG: 04/22/2021

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.