Developer forum

Forum » Templates » Format SendDate tag in Email content.

Format SendDate tag in Email content.

Jesse Bakker
Reply

Hi,

Is there a way to format the email tag:

{{EmailMessaging:Message.SendDate}} 

Now it returns the full DateTime but we would like to get the date only. So it can be used inside the content text of a recuring email.

If there is no standard feature for this. Is it possible to create custom tags, similar like TemplateExtenders for regular template tags?

Thanks.

 


Replies

 
Nicolai Pedersen
Reply

Only one format.

You are probably using a razor template and this tag is nothing but the time stamp of DateTime.now - so simply call DateTime.Now.ToString(whateverformatStringYouWant)

 

You must be logged in to post in the forum