How to Remove Leading Zeros From Dates in Oracle

In Oracle Database, you can use the fm (fill mode) format modifier to suppress any leading zeroes that might be applied to a date. This format modifier suppresses padding, which includes leading zeros and trailing blanks.

To use the fm format modifier, include it in your format model when specifying how dates should be formatted. For example when using the TO_CHAR() function to format dates, or in NLS parameters such as the NLS_DATE_FORMAT parameter when setting the date format for your current session.

Read more

RR vs YY in Oracle

When formatting dates in Oracle Database, we have the option of using RR and YY to return a two digit year.

These two format elements are similar. The difference is in how they interpret two digits years.

We also have the option of using RRRR and YYYY when returning four digit years.

Read more