WEEKDAY macro
The WEEKDAY macro is available only in HCL® Campaign.
Syntax
WEEKDAY(data [, conversion_keyword]) Parameters
data
The
ASCII text dates to convert to numerical values representing days
of the week (1-7). This can be ASCII text in quotes, a column of text,
a cell range containing text, or an expression evaluating to any of
the above. For the format definition of data, see
the "Macro Function Parameters" section in the chapter in
this guide for your HCL
product.
conversion_keyword
This optional keyword specifies how to interpret text formats for dates and times. Select one of the following:
1 - mm/dd/yy
(default)
2 - dd-mmm-yy
3
- mm/dd/yy hh:mm
If this parameter
is not specified, the default is 1.
Description
WEEKDAY converts
text values in the specified data range into numerical values representing
days of the week using the specified format for converting dates and
times. The number 0 for Sunday, a 1
for Monday, and so on up to 6 for Saturday. If a
text string cannot be parsed using the specified conversion_keyword,
WEEKDAY will return an error.
Examples
TEMP = WEEKDAY("1/1/95")
Creates a new column named |
TEMP = WEEKDAY(V1, 2)
Creates a new column named |
TEMP = WEEKDAY(V1:V3, 3)
Creates three new columns named |
TEMP = WEEKDAY(V1[10:20]:V2, 10)
Creates two new columns named |
Related functions
| Function | Description |
|---|---|
NUMBER |
Converts ASCII text strings for times and dates to numerical values |