dateTool is not working in sailpoint velocity scripts

Hi guys,

dateTool which is usually used for getting date and time in velocity scripts is working can we use any other ways to get date and time and format it.

Hi @Chiru_1307 ,

Try using this to retrieve the date and time.

#set($cal = $spTools.class.forName("java.util.Calendar").getMethod("getInstance",null).invoke(null,null))
    #set($nowDate = $cal.getTime())
$spTools.formatDate($nowDate,"yyyy-MM-dd HH:mm:ss")

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