You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Zajkowski, Radoslaw" <Ra...@proximity.ca> on 2012/02/15 23:20:32 UTC

Date formatting issue

Hi all, here's an interesting one, in my xml imported if I use very simple xpath like this

<field column="property_update_date" xpath="/document/property_update_date" dateTimeFormat="yyyy-MM-dd'T'hh:mm:ss" locale="en"/>

I will get the date properly imported, however if I use this expression for another node which is nested:

<field column="audience_customers_release_date" xpath="/document/audiences/audience/audience_release_date[../audience_name='Customers']" dateTimeFormat="yyyy-MM-dd'T'hh:mm:ss" locale="en"/>

I will receive this type of exception:  java.text.ParseException: Unparseable date: "Tue Aug 16 20:10:23 EDT 2011"

I have t use the Xpath above as I have a few of those release date nodes and I need to flatten them so we can look at dates per audience/group

I've also run just this /document/audiences/audience/audience_release_date and it works, however I need a more precise result then that since different groups could have different release dates.

Any help greatly appreciated,

Radek.


Radoslaw Zajkowski
Senior Developer
O°
proximity
CANADA
t: 416-972-1505 ext.7306
c: 647-281-2567
f: 416-944-7886

2011 ADCC Interactive Agency of the Year
2011 Strategy Magazine Digital Agency of the Year

http://www.proximityworld.com/

Join us on:
Facebook - http://www.facebook.com/ProximityCanada
Twitter - http://twitter.com/ProximityWW
YouTube - http://www.youtube.com/proximitycanada





Please consider the environment before printing this e-mail.

This message and any attachments contain information, which may be confidential or privileged. If you are not the intended recipient, please refrain from any disclosure, copying, distribution or use of this information. Please be aware that such actions are prohibited. If you have received this transmission in error, kindly notify us by e-mail to mailto:helpdesk@bbdo.com. We appreciate your cooperation.



Re: Date formatting issue

Posted by darul <da...@gmail.com>.
Expected date example :

2012-02-17T13:45:08.1Z

Date formatter:

yyyy-MM-dd'T'HH:mm:ss.SSS'Z'

Missing Zulu in yours ?

--
View this message in context: http://lucene.472066.n3.nabble.com/Date-formatting-issue-tp3748591p3753704.html
Sent from the Solr - User mailing list archive at Nabble.com.