Format date in String Template email

Posted by Gearóid on Stack Overflow See other posts from Stack Overflow or by Gearóid
Published on 2010-04-28T10:30:06Z Indexed on 2010/04/28 10:33 UTC
Read the original article Hit count: 257

Filed under:
|
|
|
|

I'm creating an email using String Template but when I print out a date, it prints out the full date (eg. Wed Apr 28 10:51:37 BST 2010). I'd like to print it out in the format dd/mm/yyyy but don't know how to format this in the .st file.

I can't modify the date individually (using java's simpleDateFormatter) because I iterate over a collection of objects with dates.

Is there a way to format the date in the .st email template?

© Stack Overflow or respective owner

Related posts about stringtemplate

Related posts about java