Below are 4 functions that enable you to return the minutes portion from a time value in MariaDB.
Continue readingTag: dates
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.
Continue readingHow 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.
Continue reading4 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.
Continue reading8 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.
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 readingHow 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.
Get the Day of the Year from a Date in SQL Server (T-SQL)
TSQL provides the DATEPART()
function, which enables us to return the day of the year for a given date in SQL Server.
By “day of the year”, I mean the day number of the given year.
Continue reading4 Functions that Extract Microseconds from a Time Value in MariaDB
Below are 4 functions that enable you to return the microseconds part from a time value in MariaDB.
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 reading