convert 1-12 into January, Feb...etc

G

Guest

I would like to store months only and convert them into
texts in my report.

Thank you
 
S

Steve

The code below uses the DateSerial function to get the
relevant Month.

Dim Mth As String
Dim inMonth As Integer

intmonth = 1

Mth = Format(DateSerial(0, intmonth, 1), "mmmm")


Hope this helps,
Steve.
 
G

Guest

Thanks Steve.
-----Original Message-----
The code below uses the DateSerial function to get the
relevant Month.

Dim Mth As String
Dim inMonth As Integer

intmonth = 1

Mth = Format(DateSerial(0, intmonth, 1), "mmmm")


Hope this helps,
Steve.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top