[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

find name of month

Posted on 2009-04-18
2
Medium Priority
?
152 Views
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.
0
Comment
Question by:johnkainn
  • 2
2 Comments
 
LVL 11

Expert Comment

by:mildurait
ID: 24175999
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
0
 
LVL 11

Accepted Solution

by:
mildurait earned 1000 total points
ID: 24176010
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
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month20 days, 8 hours left to enroll

867 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