I need to produce a simple string which should look like this:
01-03-2019 - 31-03-2019
The month and year should be of current date.
I have an expression like this:
new GregorianCalendar().getActualMinimum(Calendar.DAY_OF_MONTH) + " - " +
new GregorianCalendar().getActualMaximum(Calendar.DAY_OF_MONTH)
But this produces a string like this:
1 - 31
How can I change the statement to get a full date in the format mm-DD-yyyy
? It has to work without variables, as I am willing to use it as an variable expression in JasperSoft Studio...