I have a Java application that allows me to customize reports. The report uses tags for things like dates and names etc.
I have this tag: <[ECHO text="dateFormat.format(currentDate)"/]>
which puts out the current date like this:
May 23, 2014
but I just want the year like this:
2014
How do I do that?
EDIT:
I tried: <[ECHO text="dateFormat.format('yyyy', currentDate)"/]>
But I get this error:
com.agilemind.commons.modules.dynatags.TagValueEvaluationException: Error happened during evaluating 'dateFormat.format('yyyy', currentDate) ' of 'text' of 'ECHO' tag
at com.agilemind.commons.modules.dynatags.advanced.b.evaluate(b.java:12)
at com.agilemind.commons.modules.dynatags.advanced.EchoTag.transform(EchoTag.java:6)
at com.agilemind.commons.modules.dynatags.TagBodyElement.transform(TagBodyElement.java:9)
at com.agilemind.commons.modules.dynatags.Body.transform(Body.java:4)
at com.agilemind.commons.modules.dynatags.BodyTag.transform(BodyTag.java:55)
at com.agilemind.commons.modules.dynatags.TagBodyElement.transform(TagBodyElement.java:9)
at com.agilemind.commons.modules.dynatags.Body.transform(Body.java:4)
at com.agilemind.commons.modules.dynatags.BodyTag.transform(BodyTag.java:55)
at com.agilemind.commons.modules.dynatags.RootTag.transform(RootTag.java:18)
... 23 more
Thanks C