# Function Reference

# _DateToMonth

Returns the name of the month, based on the specified month

#include <Date.au3>
_DateToMonth ( $iMonNum [, $iFormat = 0] )

## Parameters

$iMonNum | Month number 1 = January 2 = February 3 = March ... 11 = November 12 = December
$iFormat | [optional] Format: $DMW_LOCALE_USER (0) - Long name of the month (Default) $DMW_SHORTNAME (1) - Short name of the month e.g. Jan $DMW_LOCALE_LONGNAME (2) - Long name of the month in the user's default language $DMW_LOCALE_SHORTNAME (3) - Short name of the month in the user's default language

## Return Value

Success: | Month name
Failure: | Empty string and sets the @error flag to non-zero.
@error: | 1 - Invalid month number.

## Remarks

The function returns month names in English or the user's default language.

## Example

    #include <Date.au3>
    #include <MsgBoxConstants.au3>

    ; Retrieve the long name
    Local $sLongMonthName = _DateToMonth(@MON)

    ; Retrieve the abbreviated name
    Local $sShortMonthName = _DateToMonth(@MON, $DMW_SHORTNAME)

    MsgBox($MB_SYSTEMMODAL, "Month of Year", "The month is: " & $sLongMonthName & " (" & $sShortMonthName & ")")