org.apache.commons.lang.time.FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss'Z'").format(date);
Where do I have to make these changes?
Thanks and Regards,
Shubham Gupta
On Friday 13 January 2017 09:18 AM, shubham.gupta wrote:
Also, there is a problem that all documents have a dt_stamp have
NumberLong(2000) that is when converted to Date format gives 1 Jan 1970.
Thanks,
Shubham Gupta
On Thursday 12 January 2017 05:30 PM, Furkan KAMACI wrote:
Hi Shubham,
Do you need to store it in Date format instead of Long? You can store
it as
Long and convert to ISO Date whenever you want. You can follow that:
org.apache.commons.lang.time.FastDateFormat.getInstance("yyyy-MM-dd'T'HH:mm:ss'Z'").format(date);
Kind Regards,
Furkan KAMACI
On Thu, Jan 12, 2017 at 1:50 PM, shubham.gupta
<[email protected]>
wrote:
Hey,
When a webpage is parsed it stores the date in the dt_stamp in Long
format. Whereas, I want to store it in ISODate Format. I have tried to
change the type of java.lang.Long to java .util.Long and have
changed while
setting dtStamp and getting dtStamp.
But after i build the project, these are the wrrors I get:
GeneratorReducer.java:80: error: incompatible types: long
cannot be
converted to Date
[javac] page.setDtStamp(1000L);
[javac] ^
InjectorJob.java:161: error: incompatible types: long cannot be
converted to Date
[javac] row.setDtStamp(curTime);
[javac] ^
FetcherReducer.java:682: error: incompatible types: long cannot be
converted to Date
[javac] fit.page.setDtStamp(2000L);
[javac] ^
[javac] Note: Some input files use unchecked or unsafe operations.
What changes should be made such that I can enable the dt_stamp to be
stored in Date Format?
--
Thanks and Regards,
Shubham Gupta