MONTHOF macro

The MONTHOF macro is available only in Unica Campaign.

Syntax

MONTHOF(date_string [, input_format])

Parameters

date_string

A text representing a valid date.

input_format

One of the keywords in the table below, specifying the date format of date_string.

Description

MONTHOF returns the month as a number for the date specified by the date_string. If input_format is not provided, the default keyword DELIM_M_D_Y will be used.

Examples

MONTHOF("012171",MMDDYY) returns the number 1.

Note: See DATE for additional information on valid date formats.

Related functions

Function Description
DAYOF Returns the day of the week as a number.
WEEKDAYOF Returns the weekday of the week as a number.
YEAROF Returns the year as a number.