MySQL has a bunch of different functions that enable us to get various date parts – such as the day, month, and year – from a date.
Format a Number as Currency in MariaDB
Here’s an example of formatting a number as currency in MariaDB.
How to Format Numbers as Currency in MySQL
Some DBMSs provide us with the ability to format a number as a currency by providing a format specifier for the currency symbol. Providing such a format specifier allows the DBMS to return the appropriate currency symbol for the locale.
MySQL doesn’t have a currency format specifier, and so we need to do a bit of extra work if we want the currency symbol to be returned.
How to Get the Short Month Name from a Date in MySQL
In MySQL, you can use the DATE_FORMAT() function with the %b format specifier to return the short month name. For example, you can return Jan or Feb instead of January or February.
How to Back Up an Azure SQL Edge Database to Local Disk using T-SQL
Microsoft Azure SQL Edge’s backup capabilities are similar to those in SQL Server on Linux, and SQL Server running in containers.
Azure SQL Edge supports T-SQL, and so you can back up your SQL Edge databases by running a T-SQL statement.
In this article, I back up a SQL Edge database to the local disk in my Docker container.
List of MySQL Date Format Specifiers
Here’s a list of MySQL format specifiers that can be used in format strings with functions like DATE_FORMAT(), STR_TO_DATE(), and UNIX_TIMESTAMP().
2 Functions that Return the Month Name from a Date in MySQL
The following two functions enable us to get the month name from a date in MySQL.