Gets the English display name of day of the week of a timestamp field.
Parameter | Type | Required | Default Value | Description |
---|---|---|---|---|
as | string | optional[a] | _dayOfWeekName | The name of the output field. |
field [b] | string | optional[a] | @timestamp | The name of the input field. |
timezone | string | optional[a] | The time offset to use, for example, -01:00 . If not specified, the query's offset will be used. | |
timezoneField | string | optional[a] | @timezone | The name of the field containing the timezone to use, if not specified the query's timezone will be used. This is ignored if the timezone parameter is passed as well. If this is not defined the timezone offset of the query will be used. |
[a] Optional parameters use their default value unless explicitly set. |
Hide omitted argument names for this function
Omitted Argument NamesThe argument name for
field
can be omitted; the following forms of this function are equivalent:logscale Syntaxtime:dayOfWeekName("value")
and:
logscale Syntaxtime:dayOfWeekName(field="value")
These examples show basic structure only.
time:dayOfWeekName()
Examples
Click
next to an example below to get the full details.Extract Day of Week Name From Timestamp
Get the name of the weekday from a timestamp using the
time:dayOfWeekName()
function
Query
time:dayOfWeekName(timestamp, as=weekday)
Introduction
In this example, the time:dayOfWeekName()
function
is used to extract the weekday name from a specific timestamp
2025-08-27 08:51:51.000
, demonstrating how to get the
day name from a datetime.
Step-by-Step
Starting with the source repository events.
- logscale
time:dayOfWeekName(timestamp, as=weekday)
Extracts the name of the weekday from the @timestamp field and returns the result in a new field named weekday. If the
as
parameter is not specified, the result is returned in a field named _dayOfWeekName as default. Event Result set.
Summary and Results
The query is used to extract the weekday name from a timestamp, which is useful for creating human-readable output and reports.
This query is useful, for example, to generate readable reports, create user-friendly displays, or label data with weekday names.
Sample output from the incoming example data:
@timestamp | weekday |
---|---|
2025-08-27 08:51:51.000 | Wednesday |
The result shows how the time:dayOfWeekName()
function extracts the day name (in this case
Wednesday
) from the timestamp, returning it as a
string value.
For visualizing this data, consider using a Bar Chart widget to show
event counts by day name, or a Table widget to display events with their
corresponding weekday names. The
time:dayOfWeekName()
function is often used with
other time functions like time:month()
and
time:year()
for complete date analysis.