I am migrating from MySQL to NoSql.Using mongo java driver I am able to insert the date fields which are currently being stored as NumberLong("1212121").However when I migrated the data from MySQL to NoSQL using Mongify the date field are getting saved as e.g ISODate("2015-04-19T18:48:38.121Z").To support the later I am trying through several options through SimpleDateFormat but could not get success to save the data in that ISODate format. Please suggest.
Asked
Active
Viewed 269 times
0
-
This might be useful to you - http://stackoverflow.com/questions/3778428/best-way-to-store-date-time-in-mongodb – Vishwas Apr 19 '15 at 07:31
-
@Vishwas: thanks , the URL suggest more of Java script date objects rather than java.I am trying out on java to set the date in the format for ISODate while saving. – Amar Apr 19 '15 at 08:21
-
did you tried like? - http://stackoverflow.com/questions/11815155/date-in-mongodb-when-inserting-date-objects-into-mongo-database-the-date-becom – Vishwas Apr 19 '15 at 08:32
-
yes , this too stores for me in the NumberLong format in mongo db.Not sure where I am missing. – Amar Apr 19 '15 at 08:44
-
@Azm It will be better if you put some sample data and expected output in question. – Vishwas Apr 19 '15 at 08:47