How can I convert a string in an iso date format like
"2015-06-28T03:39:43.176Z"
to look like
"2015-06-28 03:39:43 PDT" using Freemarker?
I tried some things like:
${x.Start?datetime(iso)?datetime}
${x.Start?datetime.iso?datetime}
But that didn't work.
You have to use the string
builting to convert the datetime variable, created from your string with the datetime.iso
built-in. ${"2015-06-28T03:39:43.176Z"?datetime.iso?string("yyyy-MM-dd HH:mm:ss zzz")}
works for me.
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