Skip to content

Excel Extension format for 'dddd' (day of week name) maps sundays to the empty string #11319

Closed
@jonathanswenson

Description

What happens?

When the excel format functions are used (as part of the excel extension) the day of week name formatter dddd seems to not map Sundays properly, instead mapping them to the empty String.

To Reproduce

> SELECT excel_text(i.generate_series, 'dddd') FROM generate_series(0, 14) as i;
┌───────────────────────────────────────┐
│ excel_text(i.generate_series, 'dddd') │
│                varchar                │
├───────────────────────────────────────┤
│ Saturday                              │
│                                       │
│ Monday                                │
│ Tuesday                               │
│ Wednesday                             │
│ Thursday                              │
│ Friday                                │
│ Saturday                              │
│                                       │
│ Monday                                │
│ Tuesday                               │
│ Wednesday                             │
│ Thursday                              │
│ Friday                                │
│ Saturday                              │
├───────────────────────────────────────┤
│                15 rows                │
└───────────────────────────────────────┘

OS:

mac

DuckDB Version:

0.10.1, 0.9.2

DuckDB Client:

shell, cli, wasm

Full Name:

Jonathan Swenson

Affiliation:

Omni

Have you tried this on the latest nightly build?

I have tested with a release build (and could not test with a nightly build)

Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?

  • Yes, I have

Activity

added a commit that references this issue on Mar 23, 2024

Fix duckdb#11319: use modulo when computing day of the week in excel …

04b65da
added a commit that references this issue on Mar 24, 2024

Merge pull request #11328 from Mytherin/issue11319

bef6c2b
Mytherin

Mytherin commented on Mar 24, 2024

@Mytherin
Collaborator

Thanks for the report! Fix is up here - #11328

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Excel Extension format for 'dddd' (day of week name) maps sundays to the empty string · Issue #11319 · duckdb/duckdb