Retorna uma string que indica o mês especificado.
Sintaxe
MonthName(month[,abbreviate])
Argumentos:
Comentários
O exemplo a seguir usa a função MonthName para retornar um nome de mês abreviado para uma expressão de data:
Exemplo 1:
Dim MyVar MyVar = MonthName(10) 'Output: October
Exemplo 2:
Dim MyVar1 MyVar1 = MonthName(10, True) 'Output: Oct
Exemplo 3:
Dim MonthNumber2, MyVar2 MonthNumber2 = 5 MyVar2 = MonthName(MonthNumber2) 'Output: May
Exemplo 4:
Dim Month1, Month2, Month3 Month1 = MonthName(1) Month2 = MonthName(2, True) Month3 = MonthName(12) Output: January Output: Feb 'Output: December