Announcing the Saviynt Knowledge Exchange unifying the Saviynt forums, documentation, training,
and more in a single search tool across platforms. Read the announcement here.

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 you find the response useful, kindly consider selecting Accept As Solution and clicking on the kudos button.

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