Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-36216

TO_CHAR FM format not recognized in SQL_MODE=Oracle

Details

    Description

      The format description FM which toggles Fill Mode for TO_CHAR when used to dates is not recognized. For example:

      SELECT CONCAT('/', TO_CHAR('2020-01-06 10:11:12', 'DAY'), '/');

      Returns (note two spces at the end to fill up to the length of the longest day name (Wed):

      /Monday  /

      The FM flag in Oracle negates this blank filling:

      SELECT CONCAT('/', TO_CHAR('2020-01-06 10:11:12', 'FMDAY'), '/');

      Returns:

      /Monday/

      In MariaDB the result of the latter is an error:
      ERROR 3047 (HY000): Invalid argument error: date format not recognized at FMDAY in function to_char.

      Attachments

        Activity

          ralf.gebhardt, this is a new feature.

          bar Alexander Barkov added a comment - ralf.gebhardt , this is a new feature.

          People

            bar Alexander Barkov
            karlsson Anders Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.