Has anyone seen any documentation on $spTools.formatOffsetDateTimeForEmail
It’s used in “Access Request Submitted Email for Requester After Validation Email Template”
For whatever reason, $spTools.formatDate() doesn’t work with the removal date in that template.
i.e. The following doesn’t return anything (in this specific template):
$spTools.formatDate($requestedObjectDetail.removeDate, "MM/dd/yyyy")
And also, in the Access Request for Others template, why doesn’t spTools have a $ prefixed:
So fragmented.
There was a bug created…but it’s not addressed / not fully addressed / not standardized for a year now?
This is the only thing I have found to work for removedate
#set($removeDate=$spTools.getClass().forName(“java.util.Date”).newInstance())#set($formattedDate=$spTools.formatDate($removeDate,“MM/dd/yyyy”))
You can modify the date/time formatting like “MM/dd/yyyy HH:mm:ss” if needed.
baoussounda
(Ousmane N'DIAYE)
3
Hello @LynnAndrew
Do you tested that ?
I try this but it doesn’t work.
Thanks.
sumantht
(Sumanth Thyagarajan)
4
This worked for me
#set($dateRequested=$spTools.getClass().forName(“java.util.Date”).newInstance())
<p>On $spTools.formatDate(${dateRequested},"MM/dd/yyyy"), ${requesterName} requested ${requestedObjectName} for you.</p>