AnsweredAssumed Answered

Date Format Velocity Script

Question asked by Jim Clarke on Jun 9, 2015
Latest reply on Jun 16, 2017 by Sanford Whiteman


It's been a while since I formatted dates with Velocity, I'm struggling with the DateTool methods and was wondering if someone had an example.

Here's my snippet:


##sets timestamp variable
#set ( $NextAppointment = ${OpportunityList.get(0).NextPhoneCallAppointment__c})

##This displays the timestamp unformatted
##This should display the timestamp formatted


My sample emails renders like this, clearly the method is working:

2015-06-18 17:30:00 $date.format('medium',$NextAppointment)


I was using this example to get to this state:

DateTool (VelocityTools 2.0-beta4 Documentation)


Any help would be greatly appreciated as to what I might be doing incorrectly on calling the method.