Day 14 – Record send date to Data Extension

Challenge

https://ampscript30.com/ampscript-challenge-day14/

To write the send date into another Data Extension.

Solution

%%[
SET @firstname = FirstName
SET @lastname = LastName
SET @email = Email
SET @subscriberkey = _subscriberkey

UpsertDE("AMPscript - Day 14 Reconfirmation_Log", 1, "SubscriberKey", @subscriberkey, "Email", @email, "SendDate", Now(1))
]%%

Preview

Summary

UpsertDE(name of data extension from which to update the specified row, number of columns used to build WHERE clause, column name to build WHERE clause, value used to build WHERE clause, column name to build INSERT clause, value used to build INSERT clause) helps write a row into the Data Extension – make sure to include all columns.