I've been googling for a while but I just can't seem to figure out how to pretty print a java date in a template
my application.conf
contains
date.format="yyyy-MM-dd hh:mm:ss"
and this is what I'm trying in my template
${(event.date).format('dd MMMM yyyy')}
The event member looks like
@Required
public Date date;
Any help would be appreciated, cheers!
You are using Play 1 formatting, which doesn't work in the Play 2 scala templates. You need to use the @ symbol in Play 2.
Try
@event.date.format("dd MMMM yyyy")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With