I'm new to MONGO DB. I have problem when storing date like "2016-07-22T11:22:48+01:00" in java. how could i set format to save this kind of date using Java ?
this is my code sample
I want to add date like "2016-07-22T11:22:48+01:00". So i used following code in Java.
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
Date lastmod = sdf.parse(lastmod_date);
then i used DBObject to save date to mongodb. used following code sample
sitemapObject.put("lastmod_date", lastmod);