FOX427
10 years ago
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.
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.