Data in collection compact_channel_data record: { "_id" : ObjectId("562786dc99d0948a7f1fb3de"), "channel_name" : "NPr-1.1", "valid" : true, "data" : [ { "ieq_input_raw_value" : "010010000000000000000000000000000000000000000000", "sensor_datetime" : 1445429500.625, "db_datetime" : ISODate("2015-10-21T14:11:40.625Z") }, { "ieq_input_raw_value" : "110010000000001000000000000000000000000000000000", "sensor_datetime" : 1445429500.66, "db_datetime" : ISODate("2015-10-21T14:11:40.660Z") }, { "ieq_input_raw_value" : "110010000000001001001000000000000000000000000000", "sensor_datetime" : 1445429500.624, "db_datetime" : ISODate("2015-10-21T14:11:40.624Z") }, { "ieq_input_raw_value" : "110010000000001011001000000000100000000000000000", "sensor_datetime" : 1445429500.659, "db_datetime" : ISODate("2015-10-21T14:11:40.659Z") }, { "ieq_input_raw_value" : "110010000000001010001000000000100000000000000000", "sensor_datetime" : 1445429500.671, "db_datetime" : ISODate("2015-10-21T14:11:40.671Z") }, { "ieq_input_raw_value" : "110010000000001010001000000001100000000000000000", "sensor_datetime" : 1445429500.679, "db_datetime" : ISODate("2015-10-21T14:11:40.679Z") } ], "device_id" : ObjectId("560e197f99d094dea7023768") } If I execute following query: db.compact_channel_data.find({},{'data.sensor_datetime': 1}).sort({'data.sensor_datetime': 1}) I receive following result: /* 0 */ { "_id" : ObjectId("562786dc99d0948a7f1fb3de"), "data" : [ { "sensor_datetime" : 1445429500.625 }, { "sensor_datetime" : 1445429500.66 }, { "sensor_datetime" : 1445429500.624 }, { "sensor_datetime" : 1445429500.659 }, { "sensor_datetime" : 1445429500.671 }, { "sensor_datetime" : 1445429500.679 } ] } But there is problem because the value 1445429500.66 should be behind 1445429500.659. The original value of 1445429500.66 (ISODate("2015-10-21T14:11:40.660Z") shall be behind 1445429500.659 ISODate("2015-10-21T14:11:40.659Z").