Plz write the code, function will take the parameter as
month number, i.e., numerical value, but it returns the
last day of the month in string (weekday).
example: input: function parameter: 3(march)
output: thursday
Answer Posted / lakshmi
Function MonthLastDayName(M,Y)
For i=31 to 28 step -1
MyDate=i&"-"&M&"-"&Y
if IsDate(MyDate)=true then
j=Weekday(MyDate)
Select case J
Case 1
Msgbox "Sunday"
Case 2
MsgBox "Monday"
Case 3
Msgbox "Tuesday"
Case 4
Msgbox "Wednesday"
Case 5
Msgbox "Thursday"
Case 6
Msgbox "Friday"
Case 7
Msgbox "Saturday"
End Select
Exit for
End if
Next
End Function
MonthLastDayName 9,2011
Plesae let me know if u hav any simplest answer than this.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is object spy in quicktest professional?
How can you exit from an action?
Without using gui map editor we can recognize the application in winrunner ?
what is command for executing files?
In QTP TEST DIRECTOR COMBINATION WHAT IS THE PURPOSE OF TEST DIRECTOR? In Somebody says to store test cases and design test cases.?ok fine , but In test director 5.0 , QTp not launching. what u do?
how can we test the Triggers, Cursors, Indexes while doing Database testing in DTP??
How may types of defects identify application or your currently working application?pls give me answer..
What is data driver in qtp? Where we use it?
Explain the types of object repositorys in qtp?
How to integrate QTP with QC using VB Scripting? What are the prerequisites to connect with QC?
what is description object?
How can you write the scripts that operate on different objects depending on run-time information?
How many types of run modes are there in qtp?
What are the differences between quicktest professional (qtp) and winrunner?
This is Karthic and my mail id is karthic.venkitapathi@gmail.com, please give me an idea to crack qtp 10