Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Binding variable to print current date in written format (19th Sept 2023) in email template

Bhargav
New Contributor
New Contributor

Dear Team,

We have a requirement to print current date in email template like below format,

 19th Sept 2023 

can someone assist me with binding a variable for the date format of -  19th Sept 2023 

Regards,

Bhargav.

3 REPLIES 3

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Bhargav,

Use below to find list of available binding variable.

You can find all exposed variables using below script in email body

${this.binding.variables.each {k,v -> println "$k = $v" + "<" + "br" + ">"}}

For Ref :- https://forums.saviynt.com/t5/identity-governance/binding-variable-to-print-current-date-and-time-ut... 
https://docs.saviyntcloud.com/bundle/EIC-Admin-v23x/page/Content/Chapter06-EIC-Configurations/Creati... 

Thanks,
If you find the above response useful, Kindly Mark it as "Accept As Solution".

Bhargav
New Contributor
New Contributor

Thanks Sudesh,

The below binding variable is working and giving the output as  19th Sep 2023.

${Calendar.getInstance().getTime().format("dd'th' MMM yyyy")}

Suppose if the current date is 1st,2nd,3rd,4th  in that case how can we fetch the date automatically with correct format like( st,nd,rd,th). Is there any condition to use in binding variable and also for the date. The date contains single digit and double digit like (1st,11th).

Can someone assist me with solution?

Regards,

Bhargav.

sudeshjaiswal
Saviynt Employee
Saviynt Employee

Hello @Bhargav,

Thanks for confirmation, I dont think there would be any way to place the format like( st,nd,rd,th).

If you find the above response useful, Kindly Mark it as "Accept As Solution".