> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DAYNAME

> Returns the three-letter English weekday name.

<div className="e6-meta"><span className="e6-eyebrow e6-eyebrow--quiet">Scalar function</span></div>

Returns NULL for NULL input.

## Syntax

### Scalar

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
dayname(value)
```

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| value | DATE or TIMESTAMP | Yes | Date or timestamp whose local weekday is extracted. |

## Returns

* Type: STRING
* Possible values: Sun, Mon, Tue, Wed, Thu, Fri or Sat.
* NULL behavior: Returns NULL for NULL input.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Exact result | Yes |

## Usage notes

* Timezone-bearing timestamps use their local calendar day; the test maps a UTC Friday to Saturday in Pacific/Auckland.

## Examples

### Thursday

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT dayname(DATE '2009-07-30') AS result;
```

| result |
| - |
| Thu |

### NULL input

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT dayname(CAST(NULL AS DATE)) AS result;
```

| result |
| - |
| NULL |

## Limitations

* Use the date/time types listed above. STRING input is outside this form.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.