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 readingDatabase Management Systems
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 readingMariaDB has a TRIM()
function and a TRIM_ORACLE()
function. Both functions do essentially the same thing. But there is a minor difference.
Below are 4 functions that enable you to return the microseconds part from a time value in MariaDB.
Continue readingMongoDB includes the $strLenBytes
and $strLenCP
operators in its aggregation pipeline framework. These operators do a similar but slightly different thing. In some cases, both will return exactly the same result, while in other cases the results will differ.
Here’s a quick overview of the difference between these two operators.
Continue readingIn MariaDB, SLEEP()
is a built-in function that sleeps (pauses) for the number of seconds specified by its argument.
If uninterrupted, it returns 0
, if interrupted, it returns 1
.
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 readingIf you get the Unknown table 'locales' in information_schema
error in MariaDB, it’s probably because you haven’t installed the LOCALES
plugin yet.
You need to install the LOCALES
plugin before you try to query this table.
In MariaDB, OCT()
is a built-in function that returns a string representation of the octal value of its argument.
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 readingIn MariaDB, TAN()
is a built-in numeric function that returns the tangent of its argument.