If you’re trying to use an interval literal in Oracle, but you keep getting the “leading precision of the interval is too small” error, hopefully this helps.
how to
How to Get the Day Name from a Date in Oracle
With Oracle Database, we can use the TO_CHAR(datetime) function to return a datetime value, formatted in a way that we specify.
We can use this function to return the day name from a date (as well as any other parts of the datetime value).
How to Calculate Age in MariaDB
In MariaDB, you can use the TIMESTAMPDIFF() function to calculate a person’s age (or the age of anything for that matter).
TIMESTAMPDIFF() is a built-in date and time function that returns the difference between two date or datetime expressions. Passing YEAR as the first argument, date of birth as the second argument, and the current date as the third, will return the age in years.
How to Install Windows 10 on an M1 Mac for Free
In 2020, Apple introduced Mac computers with Apple silicon, with the first chip being the Apple M1.
This was a major change, and it affected many third party applications to the point where they simply don’t run on the M1 Mac.
One application that doesn’t run on M1 Macs is VirtualBox. Prior to the M1 Mac, we could use VirtualBox to install Windows on our Mac. VirtualBox is a free virtualisation application that enables you to install virtual machines (with other operating systems) on your Mac.
Fortunately, there’s a free alternative to VirtualBox – UTM.
2 Ways to Get the Day from a Date in Oracle
Below are two functions that can be used to return the day from a date in Oracle Database.
Fix “Cannot install in Homebrew on ARM processor in Intel default prefix (/usr/local)!”
I recently tried to install QEMU on my M1 Mac but received the “Cannot install in Homebrew on ARM processor in Intel default prefix” error.
Here’s how I fixed the issue.
2 Functions to Get the Year from a Date in Oracle
Below are two functions that can be used to extract the year from a date in Oracle Database.
4 Ways to Change the Time Zone in Oracle
In Oracle Database, time zones can be set in various places. Below are four ways to change the time zone when using Oracle.
How to Return a List of Valid Time Zones in Oracle Database
Sometimes we need to specify a time zone when using datetime functions in Oracle.
But there are a lot of time zones out there. How do we remember them all? And how do we know our system supports a given time zone?
Fortunately, we can query the V$TIMEZONE_NAMES view to return a list of valid time zones.
How to Check the Date Format of your Oracle Session
When working with functions that return dates, Oracle Database returns these dates based on the value of the NLS_DATE_FORMAT parameter.
There is also an NLS_TIMESTAMP_FORMAT parameter and an NLS_TIMESTAMP_TZ_FORMAT parameter, both of which have a datetime format mask that can be specified separately.
All of these parameters have their default values derived from the NLS_TERRITORY parameter (which by default, is operating system-dependent).