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

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -