Afternoon,

I wonder if anyone could shed any light on this one that's stumping me.

I have a table that is storing dates using seconds since epoch, so something 
like this:

1182262980

When I first wrote my queries for DIH it was complaining about this and rightly 
so as I had a mapper thus

<field column="posted" name="created_at" dateTimeFormat="yyyy-MM-dd hh:mm:ss" />

So I realised I needed to get the format changed up. So I added to my SQL a new 
column

from_unixtime(posted) as posted_fmt

which turns the value into this

2007-06-19 09:08:48

which is just like all my other dates, a unix format as expected by my 
dateTimeFormat

Yet every time this is indexed I get

Oct 12, 2010 11:03:04 AM 
org.apache.solr.handler.dataimport.DateFormatTransformer transformRow
WARNING: Could not parse a Date field 
java.text.ParseException: Unparseable date: "Thu Jul 22 10:16:23 EDT 2010"

Which seems a bit weird to me. All my other SQL queries are able to transform 
unix date/time into the column except this particular entity where I do this 
extra column to get the right format.

I'm not seeing it ... help :)

Thanks, Allistair

Reply via email to