Freemarker Date Format issue

FOX427 <[email protected]> Mon, 2 Mar 2015 07:30:24 -0800 (PST)
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
Hi All, I am getting date from xml node in this format: Mon, 02 Mar 2015
14:35:47 +0000.
I need to present this as March 2, 2015. So I tried this:

<#assign publishedDate=item.pubDate?datetime("a, d MMM yyyy hh:mm:ss zzz")>
            ${publishedDate?string("yyyy")}<br>

So as you can see, I just wanted to extract year first and if it works I
would add day and month. But it is giving me error message: Unparseable
date: "Mon, 02 Mar 2015 14:35:47 +0000". It seems I am actually having the
date value but unable to parse it, can someone give me some advice how to do
it correctly? Thank you in advance.



--
View this message in context: http://freemarker.624813.n4.nabble.com/Freemarker-Date-Format-issue-tp4655381.html
Sent from the freemarker-user mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/