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

Printing current date in email

AJ23494
New Contributor II
New Contributor II

Hi Team , 

I have a requirement where i need to print the current date in the email template . 

Suppose the email was triggered on 5th september then the body of the email should contain this date . 

How to achieve that ? is there a associated system variable for the same 

Thanks 
Ankit Jindal 

4 REPLIES 4

rushikeshvartak
All-Star
All-Star

You can try java methods

Today is ${new Date()}

rushikeshvartak_0-1662392782884.png

Email Output : 

rushikeshvartak_1-1662392807034.png

 

 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.

sahajranajee
Saviynt Employee
Saviynt Employee

@AJ23494 ,

In case the 'new' keyword is blocked on your app version, you can use the below :

${Calendar.getInstance().getTime()}

You will get date as below :

sahajranajee_0-1662630538712.png

 

 


Regards,
Sahaj Ranajee
Sr. Product Specialist

Hi Sahaj , 

Is there a way to only print the date and not time ?

Thanks & Regards , 
Ankit Jindal 

sahajranajee
Saviynt Employee
Saviynt Employee

@AJ23494 

Yes try : ${Calendar.getInstance().getTime().format('yyyy-MM-dd')}


Regards,
Sahaj Ranajee
Sr. Product Specialist