1

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

1

I ended up using AmpScript:

%%[ 
  var @localDate
  set @localDate = SystemDateToLocalDate(Now())
  
]%%

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

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .