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

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.