Below are 4 functions that enable you to return the hour from a time value in MariaDB.
dates
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.
2 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.
4 Functions that Return the Minutes from a Time Value in MariaDB
Below are 4 functions that enable you to return the minutes portion from a time value in MariaDB.
How to Add AM/PM to a Time or Datetime Value in MariaDB
MariaDB includes many functions that allow you to return time and datetime values in a variety of formats.
Two functions allow you to format the time portion using a 12 hour clock, with the AM/PM designator are DATE_FORMAT() and TIME_FORMAT().
There are many format specifiers that can be used with these functions, but only a couple that return the AM/PM designator.
How to Subtract a Year from a Date in MariaDB
MariaDB provides several ways to perform arithmetic on dates. This includes adding or subtracting a year (or many years) from a given date.
Here’s an example of subtracting a year from a date in MariaDB.
4 Functions that Return the Seconds Part from a Time Value in MariaDB
Below are 4 functions that enable you to return the seconds part from a time value in MariaDB.
8 Ways to Add Minutes to a Datetime in MariaDB
MariaDB provides many ways to perform date arithmetic. This includes adding or subtracting a certain number of a given date part from a date or datetime value.
In this article, I present 8 ways to add one or more minutes to a datetime value in MariaDB.
4 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.
How to Run SHOW LOCALES in MariaDB
If you’re trying to run SHOW LOCALES but it’s not working, it’s probably because the LOCALES plugin hasn’t been installed yet. Installing that plugin should hopefully fix the problem.