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

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -