find name of month

Posted on 2009-04-18
Last Modified: 2013-11-26
How can I get the name of a month by using its number, i.e. by using 4 I would like to get April.
I would like to do the same for the days of the week.
Question by:johnkainn
    LVL 11

    Expert Comment

    This should do it...

    function getMonth(byVal MonthNo as long) as string
            Dim dDate as new Date(2000,MonthNo,1)
            return dDate.ToString("MMMM")

    end Function
    LVL 11

    Accepted Solution

    function getDayName(byVal DayNo as long) as string

              'June 2008 started on a Sunday
              Dim dDate as new Date(2008,6,DayNo)
              return dDate.ToString("dddd")
    end function

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    Summary Displaying images in RichTextBox is a common requirement with limited solutions available. Pasting through clipboard or embedding into RTF content only support static images.  This article describes how to insert Windows control objects int…
    This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now