Here are two ways to return the short month name from a date in MariaDB.
Continue readingTag: how to
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.
Continue readingHow 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 Language Currently Being Used in SQL Server
There are several ways to get the language currently being used in SQL Server.
The language of the current session will often be the default language for the login, but this is not necessarily always the case. A user can change the current language during the session.
Also, some of SQL Server’s built-in functions accept an argument that allows you to specify a language for that specific query.
This article shows you how to return the language currently being used.
Continue readingGet 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 reading