Please share any images or screenshots, if relevant.
Share all details about your problem, including any error messages you may have received.
In the TaskDefinition I have converted start date field from String to Date format of ddMMyyyy.
Original string: 17072024
Current Result: 7/17/24, 12:00 AM
Expected Result: 17/07/2024 OR 07/17/2024
Understand that day and month field follows web browser locale so both expected results are fine.
However, would like to understand because the field is now a java.Util.Date class is there some SailPoint default java controlling it, thus the time is showing as well?
Because the requirement is to only show the date in the custom report without time. Please advise.
I think your code are not execute.
remove log.error(date) or use System.out.println(): log variable are not declarated.
For parse use this format "MM/dd/yyyy" or "dd/MM/yyyy"
In Java, the Date object inherently includes both date and time information. However, if you want to print only the date part without the time, you can format the Date object to a string that only includes the date portion.
SimpleDateFormat format1 = new SimpleDateFormat("ddMMyyyy");
SimpleDateFormat format2 = new SimpleDateFormat("dd/MM/yyyy");
Date date = format1.parse("17072024");
System.out.println(format2.format(date));