Velocity Script - to add 30 minutes in the Meeting time
Hey,
I want to display Meeting StartTime and End time (Total Meeting time is 30 minutes) like Tuesday, May 18, 10:00 -- 10:30 am EDT
The field I am using is 'Appointment_Start_DateTime_Text__c' (DataType = Text).
The value of the 'Appointment_Start_DateTime_Text__c' is '05/03/2021 10:00:00 AM EDT'
#foreach($obj in $sorter.sort($Activity_Marketo__cList , "CreatedDate__c:desc"))
#set($Appointment_Start = $date.toDate("MM/dd/yyyy hh:mm:ss a", $obj.Appointment_Start_DateTime_Text__c))
#set($dateFormatted = $date.format("EEEE, MMM. dd", $Appointment_Start))
#set($salutationdate = $date.format("MMMM d", $Appointment_Start))
#set($dateFormattedHours = $date.format("hh:mm a", $Appointment_Start))
#set($FormattedStartDate = $date.format("EEEEE, MMMM d,", $Appointment_Start))
#set($FormattedStartTime = $date.format("h:mm", $Appointment_Start))
## EndTime ##
#set($FormattedEndTime1 = $Appointment_Start.calendar)
#set($FormattedEndTime = $FormattedEndTime1.add(12,30))
## EndTime ##
#set($AMPM = $date.format("a", $Appointment_Start))
## TimeZone ##
#set ($Appointment = "$obj.Appointment_Start_DateTime_Text__c")
#set ($stringLength = $obj.Appointment_Start_DateTime_Text__c.length() - 0)
#set ($AppointmentTimeZone = $Appointment.substring(23,$stringLength))
## TimZone ##
$FormattedStartDate $FormattedStartTime -- $FormattedEndTime $AMPM.toLowerCase() $AppointmentTimeZone
#break
#end
The Output is --> Monday, May 3, 10:00 -- $FormattedEndTime am EDT
Can any one help me ASAP what is wrong in the EndTime script.
Thanks in advanced!