

1ĭateToString( '%Y-%m-%d', "hire_date") as hiredate The $dateToString expression has the following syntax: 1Īs SQL functions doesn't support JSON object parameter, NoSQLBooster for MongoDB converts the object param as plain parameter list. The dateToString is another MongoDB date operator to convert a date object to a string according to a user-specified format. #If a time part is included, an offset from UTC can also be included as +-HH:mm, +-HHmm, +-HH or Z. 09:30:26 # An hour, minute, and second time part #A time part can also be included, separated from the date part by a space or an uppercase T.
#Tableplus mongodb query iso#
# An ISO 8601 string requires a date part. Please refer to Moment.js parse string document to view all supported string formats. When creating a date from a string, Moment.js first check if the string matches the known ISO 8601 formats, Moment.js then check if the string matches the RFC 2822 Date time format before dropping to the fall back of new Date(string) if a known format is not found. NoSQLBooster for MongoDB uses Moment.js to parse date string. The date function converts a string to a MongoDB Date type.
#Tableplus mongodb query code#
Better yet, all SQL Functions provide the appropriate code snippets and mouse hover information and support code completion.įor example, the employees' collection has the following fields including number, first_name, last_name, salary, department, and hire_date.
#Tableplus mongodb query how to#
With this tutorial, you can learn and understand how to use NoSQLBooster SQL Query for MongoDB. It should be mentioned that there is a tutorial on NoSQLBooster SQL Query for MongoDB in the lower left “Samples” pane. The Equivalent MongoDB Query can be viewed in the console.log tab. The SQL query is validated and translated into a MongoDB query and executed by NoSQLBooster for MongoDB. Please note that MongoDB does not natively support SQL features. Autocomplete for keywords, MongoDB collection names, field names, and SQL functions.Provide a programming interface (mb.runSQLQuery) that can be integrated into your script.Aggregation Pipeline Operators as SQL Functions (dateToString, toUpper, split, substr.).SQL Equi JOIN and Uncorrelated SubQuery.


SELECT department, SUM(salary) AS total FROM employees GROUP BY department You can query MongoDB by using old SQL which you probably already know. Instead of writing the MongoDB query which is represented as a JSON-like structure 1 Let's look at how to use the GROUP BY clause with the SUM function in SQL. See the features and SQL examples supported by the NoSQLBooster for MongoDB. SQL support includes functions, expressions, aggregation for collections with nested objects and arrays. With NoSQLBooster for MongoDB, you can run SQL SELECT Query against MongoDB.
