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



Plz write the code, function will take the parameter as month number, i.e., numerical value, but ..

Answer / 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

More QTP Interview Questions

i want to learn testing tools what i have to know before.iam fresher i dnt know any this..which langagues i have to before testing.

2 Answers   Wipro,


how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer

0 Answers  


i want 8.2 and 9.2 dacuments plhelp any body sand it to my id sandhyat1@yahoo.co.in

3 Answers   Siloka,


What is text/text area checkpoint?

0 Answers  


can u explain about QTP Frameworks? what are the framework types are available? and How to set or create frame work for a application? Explain briefly?(Also give me one example)

1 Answers  






can u write Script to do Data Driven Testing throuh Externel & internel XL Sheet

2 Answers   Relq,


In Object Repository, two actions r there. Action1 name is A.tsr, Action2 name is B.tsr. Is it Possible? if Yes, what is the out put of A+B? if No, why?

2 Answers   Kanbay,


How you are maintaining shared object repository in your team or your project?help me plz

1 Answers   CTS,


what version of test director supports the QTP? does testdirector supports the QTP9.0?

1 Answers  


I am just a beginner in QTP. Could any one explain me in detail how to automate adding two numbers and getting the result in QTP. Also I would like to parameterize the inputs. I have tried but getting an error like 'Can't use sub.....'(can't recollect the exact error)

2 Answers  


I am a new tester that needs to create an automatic script involving security questions. On a webpage I need to select a security question(which are random) from a drop down menu, and then input the answer as the last word from the security question. I have the script set-up to automatically select the first security question from the drop down. The problem I am having is trying to insert the security answer. How do I insert the security answer based on the selection from the security question?

0 Answers  


If you are testing a web application then what will you test in that application?

0 Answers   Infosys,


Categories