Skip to content

New API for DAYOFWEEK #299

@abinand0911

Description

@abinand0911

Please extend the API to include a new scalar function, DAYOFWEEK.

The DAYOFWEEK function accepts a single argument. The input source can be any of the following types:

  • string (must be castable to date/timestamp)
  • timestamp
  • date
  • timestamp with local time zone
  • null (returns null)

Example Queries

-- Returns the day of the week as 1 because the given date is a Sunday
SELECT DAYOFWEEK(DATE '2024-06-30') FROM dual;

-- Returns the day of the week as 2 because the given date is a Monday
SELECT DAYOFWEEK(TIMESTAMP '2024-07-01 12:00:00') FROM dual;

-- Typical use in a table context
SELECT DAYOFWEEK(column_name) FROM my_table;

Capabilities

New Capability

  • FN_DAYOFWEEK

Metadata

Metadata

Assignees

No one assigned

    Labels

    featureProduct feature

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions