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

How to supress warnings from the "Test results page"?

2 Answers  


How to carry out bit map check points in QTP

0 Answers   kenexa,


How do u do batch testing in WR & is it possible to do in QTP, if so explain?

1 Answers   Crea,


In project module it contains 3-ok buttons with same properties who qtp identify its objects while runing ??

5 Answers   HCL,


Write the vb script for the lowest and highest values of an array?

1 Answers   Manhattan,






what is the framework followed by ur company in qtp

5 Answers  


diff between qtp versions from 8.5

0 Answers   Semantic Space,


what is synchronization point, synchronization method, wait property method? with examples.. plz explain this in brief

3 Answers  


Explain measuring transaction.

0 Answers  


Question:how many types of repositories in QTP9.2?and explain??

3 Answers  


Action1: I have a value "test" stored in a variable X. I want to use that variable X in Action2 .. how?

1 Answers  


what ar the challenges do we face while testing webbased applications using the automation tool qtp or any?

4 Answers   TCS,


Categories