we have an eamil that use a conbination of a JSON and Data Ext. to personalize it, right now we need to insert into a data ext, a date that come from the JSON file, and the date that the user recieve the email to use this data for a exclusion script into a journey, where this email belong. We put the the insert funtion in the main email and this block for us the preview sendings and the sends inside the journey that we created.
This is the code, that we are using and give us trouble :
%%[
set @formatFecha = Format(@from, "mm/dd/yy")
set @fechaVuelo= DateParse(@formatFecha,0)
InsertDE("Fecha_Vuelo","SubscriberKey",_subscriberkey,"EmailAddress",emailaddr, "Date", @fechaVuelo, "EventDate", NOW() )
]%%
We also try this, thinking that the date formatting can cause the error
%%[
set @fechaVuelo= StringToDate(@from)
InsertDE("Fecha_Vuelo","SubscriberKey",_subscriberkey,"EmailAddress",emailaddr, "Date", @fechaVuelo, "EventDate", NOW() )
]%%
We just try almost everithing, like set all the common variables like emailaddr or _subscriberkey and didn't work either, if someone can give us an alternative we are going to be the happiest nerds of the planet!!
@from
variable? I'm pretty sure the issue comes from the initial format of your date that cannot be converted correctly