--- title: "SWEEKDAY(A)" slug: "engineeringdatefunction2-17" updated: 2021-10-15T14:07:56Z published: 2021-10-15T14:07:56Z canonical: "docs.datajet.app/engineeringdatefunction2-17" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.datajet.app/llms.txt > Use this file to discover all available pages before exploring further. # SWEEKDAY(A) ## Date Transform: SWEEKDAY(A) ## Returns the name of the weekday in Date A as a string of format 1-Monday : 7-Sunday ## Purpose Use this function to: - Create Date/Weekday mappings - Create user legible weekday labels ## Return Value | Property | Value | | --- | --- | | **FieldType** | String | | **FieldSize** | Low | | **DataType** | Discrete | | **DataSize** | Short | ```shell Example Return Value: 1-Monday, 2-Tuesday...7-Sunday ``` ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/SWEEKDAY_Sample.PNG) ## Parameters | Parameter | JSON | Description | | --- | --- | --- | | **Table** | “targetTable”: “MyTableName” | The target table on which the new field will be created | | **Filter** | “dataset”: {DataSet_JSON} | Optional. If a filter is applied, records not in the filter Recordset will be returned as null. | | **DateTimeFunction** | “p1”: “SWEEKDAY(A)” | SWEEKDAY(A) | | **A** | “p2”: “DateTimeFieldName” “p2”: “DateFieldName” “p2”: “#YYYY-MM-DD HH:MM:SS” “p2”: “#YYYY-MM-DD” | Required. The date from which to extract the weekday *Supports:* - **DataType:** Discrete / Continuous - **Field Type:** Date, DateTime - **Fixed Value:** #YYYY-MM-DD, e.g. #2021-04-05 - **Fixed Value:** #YYYY-MM-DD HH:MM:SS, e.g. #2021-04-05 11:01:08 | ## JSON Sample ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/SWEEKDAY_JSON.PNG) ## Usage Notes See Also: - WOY(A) - Week Of Year - SMONTH(A) - Month as String - WEEKDAY(A) - Weekday as Integer ## Example | Example | Details | | --- | --- | | **Description** | Create mapping to show day of week that product was shipped | | **Input** | - Table: = [transactions] - Function: = DateTransform - **DateTimeFunction: = SWEEKDAY(A)** - A:= [transactions].[dtShipping] - Name: = ShippingWeekday | | **Sample** | ![](https://cdn.document360.io/73b6469b-c1e4-47e9-aa65-986c8ebd17ca/Images/Documentation/SWEEKDAY_Example.PNG) |