 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Convert NumberLong to String in MongoDB?
In order to convert NumberLong to String in MongoDB, you can use toString() −
NumberLong('yourValue').valueOf().toString(); To convert NumberLong to String, you can use valueOf() as well −
NumberLong('yourValue').valueOf(); Let us implement both the above syntaxes.
Following is the query to convert NumberLong to String with toString() −
> NumberLong('1000').valueOf().toString(); This will produce the following output −
1000
Following is the query to convert NumberLong to Number with valueOf()
> NumberLong('1000').valueOf(); This will produce the following output −
1000
Advertisements
 