What is the syntax to return the month of a date?

Month(date)
‘returns a value from 1 to 12
‘examples
MsgBox (Month("2086/5/25")) 'returns 5
MsgBox (Month("2086-5-25")) 'returns 5
MsgBox (Month(#5/25/2086#)) 'returns 5

 

Advertisements