I've got a few date tokens that I've reworked using Velocity, but there are a few issues, the most troubling of which is that the script succeeds in the Marketo email previewer but fails when I send a test email containing it. Look:
-
Parse date to make it manipulable.
-
#set ($x = ${convert.parseDate($lead.DATEFIELD,"MMM d',' yyyy")})
-
Compare dates.
-
$date.difference($x,$date)
This works in the previewer. When I send an email containing anything above, however, I get the script and not its output. I've even tried $convert.toString($x), but that hasn't worked.
Can anyone shed some light on what's going on? Thanks!