SWEEKDAY(A)
  • 1 Minute to read
  • Dark
    Light
  • PDF

SWEEKDAY(A)

  • Dark
    Light
  • PDF

Article summary

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

PropertyValue
FieldTypeString
FieldSizeLow
DataTypeDiscrete
DataSizeShort


Example Return Value: 1-Monday, 2-Tuesday...7-Sunday

Parameters

ParameterJSONDescription
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

Usage Notes

See Also:   

  • WOY(A) - Week Of Year
  • SMONTH(A) - Month as String
  • WEEKDAY(A) - Weekday as Integer

Example

ExampleDetails
DescriptionCreate mapping to show day of week that product was shipped
Input
  • Table: = [transactions]
  • Function: = DateTransform
  • DateTimeFunction: = SWEEKDAY(A)
  • A:= [transactions].[dtShipping]
  • Name: = ShippingWeekday
Sample



Was this article helpful?

What's Next