Can we use Velocity DateTool to customize ${request.date} in MFA Enrolled Email

We are trying to build a bilingual email template and we need to format the ${request.date} attribute in MFA Enrolled / Authenticator Enrolled Email template.
Can we use Velocity DateTool to customize ${request.date} in MFA Enrolled Email template? DateTool (VelocityTools 3.2-SNAPSHOT API)
If Not, how can else can we customize ${request.date} to achieve the below -
from ‘28 November 2023’ → to ‘28-11-2023’

I’ve had issues myself trying to manipulate dates included in email templates, but I’ve not found a solution to those in the past (since all our Time conversion functions seem to only accept a specific input format)

You might also try asking this in our main community forum, I know I’ve seen questions related to email customizations there before.

Thanks Andrea for responding on this.

We had raised a case with Okta Support and were able to get a solution for this. Adding this here in case someone has a similar requirement -

#set($utcDate = $DateTool.getCurrentDateTime())
#set($pstDate = $utcDate.minusHours(8))
Transaction Date: $DateTool.displayDateTime($utcDate, ‘EEEE, dd MMMM yyyy’)

Thanks.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.