I store an end date(last_day_for_payment) for Event payment in SalesForce. I send reminder 3 month before last_day_for_payment that date and ask user to pay before 2 month of last_day_for_payment to get discount. Is there a way to use some kind of formula to add/substract date in visual force email template. eg {!relatedTo.last_day_for_payment} - 2 months
Right now I am using formula field named last_day_for_discount to store the date 2 month ahead of last_day_for_payment
Now the main question:
I can use format date in email template body with OutputText tab like below,
<apex:outputText value='{0, date, MMMM d}'><apex:param value='{!relatedTo..last_day_for_discount}' /></apex:outputText>
I want to have email subject line like this: IMPORTANT: Please pay your fee by 5 May
I have following code which create subject line,
<messaging:emailTemplate subject="IMPORTANT: Please pay your fee by {!relatedTo.last_day_for_discount}" recipientType="Contact" relatedToType="Events">
This display date as it is stored in SF: "07/01/2016"
Can I format it, in subject line, like to get only '7 Jan'
somehow?! Outputtext does not work in subject.
Any help highly appreciated.