MYSQL datetime to mongoDB -
i have converted mysql db mongodb.
one field, publish_datetime mysql datetime field.
in mongo, need todo ordering datetime field.
is possible without converting seperate field timestamp?
it not matter type is, sorting either datetime value or integer value happens with:
db.collection.find().sort( { field_name: 1 } );
however, helpful if showed sample document has "datetime" value in there.
Comments
Post a Comment