Hi Everyone, Im trying to achieve this format 3/24/16 2:36:46 PM in Jasper , Could you help me out in Framing the Date Functions to achieve this.
Regards,
Santosh
2 Answers:
Posted on March 24, 2016 at 3:36am
That's very strange. Your Java has a but because "yyyy" would return "24-03-2016" instead of "3/24/16"!
What you want is
new SimpleDateFormat("M/dd/yy HH:mm:ss a").format(new Date())
Anyways, the proper way to do this in JasperReports is to set expression to "new Date()" and set pattern to "M/dd/yy HH:mm:ss a"