Mihai Budiu created CALCITE-6253:
------------------------------------

             Summary: BigQuery FORMAT_DATE function does not implement all 
format specifiers
                 Key: CALCITE-6253
                 URL: https://issues.apache.org/jira/browse/CALCITE-6253
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.36.0
            Reporter: Mihai Budiu


The following query:

{code:sql}
SELECT 
format_date('%A,%a,%B,%b,%C,%D,%d,%e,%F,%G,%g,%h,%j,%m,%U,%u,%V,%W,%w,%x,%Y,%y,%t,%%','2024-02-07')
{code}

produces the following output in Calcite:

{code}
Wednesday,Wed,Feb,Feb,%C,%D,07,07,2024-02-07,%G,%g,%h,038,02,%U,4,06,06,%w,02/07/24,2024,24,%t,%%
{code}

The expected output, checked in the BigQuery playground, is:

{code}
Wednesday,Wed,February,Feb,20,02/07/24,07, 
7,2024-02-07,2024,24,Feb,038,02,05,3,06,06,3,02/07/24,2024,24,\t,%
{code}

This implies that the following format specifiers are not implemented: %C, %D, 
%G, %g, %h, %U, %w, %t, %%.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to