Skip to content

MonthName - Built-in Date & Time Function

Purpose

MonthName returns the name of the month from a datetime expression.

Syntax

MonthName(datetime [, bool])

Arguments

Argument Required Description
datetime Yes Any valid datetime expression from which the month will be returned.
bool No When true, the returned name is the abbreviated name of the month (e.g., Sep vs. September).

Returns

String

See also

Example

// returns "October" when PC’s regional settings are set to English
Return MonthName(DateSerial(2014,10,30))
// returns "Oct" when PC’s regional settings are set to English
Return MonthName(DateSerial(2014,10,30),true)

Notes

  • When datetime cannot be converted to a datetime value, a runtime error is generated.
  • MonthName uses the locale settings to return the name of the month (e.g., February in English and Februari in Dutch).
  • The function returns a string.