function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Irvine DelacroixIrvine Delacroix 

Visualforce Template Date field different Result

Hello Guys,

Can anyone please help me on my Visualforce Email Template.

Basically, I have Start and End Date in my Object.

Here's how I referenced the Date start and End to my Visualforce Email Template.

<apex:outputText value="{0,date,EE MMM dd YYYY}">
         <apex:param value="{!MyObject.Start__c }"/>
</apex:outputText> to
<apex:outputText value="{0,date,EE MMM dd YYYY}">
        <apex:param value="{!MyObject.End__c}"/>
</apex:outputText>


Example expected Result:

If my Start is December 20 and End is December 20 as well, then I should get December 20 to December 20 when my Template is used.

However, the result that I got was December 19 to December 20 even if Both fields are the same date.

What is the correct syntax so that my Visualforce template will just copy the exact value of my Date Fields.

Thanks a bunch!
BalajiRanganathanBalajiRanganathan
The Date displayed on the Email template is on GMT timezone. that might be the cause for what you are seeing.

try to do workaround as given in the forum below

https://developer.salesforce.com/forums/ForumsMain?id=906F000000098DmIAI