This article lists the various aggregation pipeline operators that can be used to return individual date parts from a Date object in MongoDB.
Continue readingTag: date format
8 Functions to Return the Day from a Date in MariaDB
MariaDB has quite a number of functions that return the day from a date. It all depends on how you want to do it, and what you mean by “day”.
MariaDB needs to know whether you want the day name, the day of the week number, the day of the month, day of year, etc.
Below are 8 functions that enable you to return the day from a date in MariaDB, in its various forms.
Continue reading2 Ways to Get the Short Month Name from a Date in MariaDB
Here are two ways to return the short month name from a date in MariaDB.
Continue reading4 Functions to Return the Year from a Date in MariaDB
Below are 4 functions that enable you to return the year from a date in MariaDB. Three functions return just the year, and one returns both the year and week.
Continue reading3 Ways to Get the Day Name from a Date in MariaDB
Below are three approaches you can use to get the day name from a date in MariaDB.
Two of these approaches return the full day name, and one returns the short day name.
Continue reading11 Functions to Get the Day, Month, and Year from a Date in MariaDB
MariaDB includes many functions for working with dates. Some of these extract certain parts from such dates and return them as a string or integer.
Below are 11 functions that you can use to return various date parts in MariaDB.
Continue reading3 Ways to Convert a Date to a String in MongoDB
MongoDB has a Date BSON type that allows you to store dates as dates.
You can also store dates as strings, if that’s what you need.
Taking it a step further, you can also convert a Date to a string.
This article presents three ways to convert a Date to a string in MongoDB.
Continue readingConvert a Month Name to the Month Number in SQL Server (T-SQL)
In SQL Server, you can use the MONTH()
function to convert a month name to its corresponding number.
3 Ways to Get the Month Name from a Date in MariaDB
Here are three ways to return the month name from a date in MariaDB.
Continue readingHow MONTHNAME() Works in MariaDB
In MariaDB, MONTHNAME()
is a built-in date and time function that returns the name of the month name for a given date.
It accepts one argument, which is the date you want to extract the month name from.
Continue reading