I have a package that sends emails, I have it set with a configuration file so I can pass a parameter with the addresses, attachments, etc. that I want to use, one of these parameters is the Message_source:
in which I pass the content of the email.
my problem comes in that I want to pass formatted text and a dynamic field (date). how can I do this so I can send something like this:
<Configuration ConfiguredType="Property" Path="\Package.Variables[User::Email_Content].Properties[Value]" ValueType="String">
<ConfiguredValue>here I want to pass a date, here is the date: @Date</ConfiguredValue>
</Configuration>
so I can generate something like this:
here I want to pass a date,
here is the date: 05-01-2023
I know that I can parse the date with:
RIGHT("0" + (DT_STR, 2, 1252) DATEPART("dd" , GETDATE()), 2) + "-" + RIGHT("0" + (DT_STR, 2, 1252) DATEPART("mm" , GETDATE()), 2) + "-" + (DT_STR, 4, 1252) DATEPART("yy" , GETDATE())
however adding this to the config file right away doesn't work.