Database.Guide

Skip to content

Beginners

  • What is a Database?
  • Database Tutorial

SQL

  • SQL Tutorial
  • SQL Reference
  • SQL Joins Tutorial
  • SQL Transactions Tutorial
  • Basic SQL Queries

Categories

  • Azure SQL Edge (17)
  • Database Concepts (99)
  • Database Tools (72)
  • DBMS (9)
  • DuckDB (143)
  • MariaDB (424)
  • Microsoft Access (17)
  • MongoDB (265)
  • MySQL (602)
  • NoSQL (8)
  • Oracle (301)
  • PostgreSQL (480)
  • Redis (210)
  • SQL (697)
  • SQL Server (1,170)
  • SQLite (298)

Category: NoSQL

MongoDB $toString

Posted on January 29, 2021January 29, 2021 by Ian

From MongoDB 4.0, you can use the $toString aggregation pipeline operator to convert a value to a string.

Continue reading →
MongoDB convert, what is

MongoDB $convert

Posted on January 28, 2021January 28, 2021 by Ian

In MongoDB, you can use the $convert aggregation pipeline operator to convert a value to a specified type.

You can convert any valid expression to a double, string, ObjectId, boolean, Date, integer, long, or decimal.

Continue reading →
MongoDB aggregation, convert, what is

MongoDB Date() Method

Posted on January 28, 2021January 28, 2021 by Ian

In MongoDB, the Date() method returns a date either as a string or as a Date object.

  • When you call it as Date(), it returns the current date as a string in the mongo shell.
  • When you call it as new Date(), it returns the current date as a Date object.

You can also provide a specific date as an argument to new Date(), so that it uses that date.

Continue reading →
MongoDB dates, methods, what is

MongoDB NOW Aggregation Variable

Posted on January 28, 2021January 28, 2021 by Ian

MongoDB provides the NOW system variable that allows you to get the current datetime value when using an aggregation pipeline.

This can be useful for when you want to update a document with the current datetime.

Continue reading →
MongoDB aggregation, dates, what is

MongoDB $dateFromParts

Posted on January 27, 2021January 28, 2021 by Ian

In MongoDB, the $dateFromParts aggregation pipeline operator constructs and returns a Date object from the date’s constituent parts.

You provide each date part as a separate field.

You can specify your constituent date fields in ISO week date format if required.

Continue reading →
MongoDB aggregation, date format, dates, what is

MongoDB $dateToParts

Posted on January 27, 2021January 28, 2021 by Ian

In MongoDB, the $dateToParts aggregation pipeline operator returns the date parts of a given date.

More specifically, it returns a document that contains the constituent parts of a given BSON Date value as individual properties.

Continue reading →
MongoDB aggregation, date format, dates, what is

MongoDB $dateToString

Posted on January 26, 2021January 28, 2021 by Ian

In MongoDB, the $dateToString aggregation pipeline operator converts a given date object to a string.

The $dateToString operator accepts either a Date, a Timestamp, or an ObjectId.

Continue reading →
MongoDB aggregation, date format, dates, what is

MongoDB $dateToString Format Specifiers

Posted on January 26, 2021January 28, 2021 by Ian

The following table outlines the format specifiers that can be used with the $dateToString aggregation pipeline operator in MongoDB.

Continue reading →
MongoDB aggregation, date format, dates

MongoDB $dateFromString

Posted on January 25, 2021January 28, 2021 by Ian

In MongoDB, the $dateFromString aggregation pipeline operator converts a date/time string to a date object.

Continue reading →
MongoDB aggregation, date format, dates, what is

MongoDB $dateFromString Format Specifiers

Posted on January 25, 2021January 28, 2021 by Ian

The following table outlines the format specifiers that can be used with the $dateFromString aggregation pipeline operator in MongoDB.

Continue reading →
MongoDB aggregation, date format, dates
  • «
  • 1
  • …
  • 36
  • 37
  • 38
  • 39
  • 40
  • …
  • 49
  • »

About Database.Guide | Privacy Policy