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

suppose i can done the project , that project have 4 modules in that one module they have many links(web pages).in that time i can say i can work on some links? or total module?

4 Answers  


How to capture text from image to word

2 Answers  


how to lunch the application in the qtp tool ?

3 Answers  


Describe how Smart Identification is used

0 Answers  


Is it possible to merge two object repository files in qtp?

0 Answers  


am not having intrest in coding lang like c c++ java etc can i choose Testing tools as my carrier and please suggest me which tool is good (suitable for me)

0 Answers  


What is action?

0 Answers  


i'm using QTP 8.2. A person using QTP 9.0 sends me a QTP TestScript, same when i try to open , an error comes "unexpected file format". Why?? and how to resolve the problem??

2 Answers  


Scenario:2 combo boxes.1st combo contains a,b,c,d.2nd combo contains 10..20,20..30,30..40,.Selecting 'a' shld display 10...20,'b' shld display 20..30.. and so on.tell d script? 2.Random testing of 500 test cases in qtp?

1 Answers  


what is the difference between data table and spread sheet?

1 Answers  


How to change the priorities of the recovery scenario properties?

0 Answers  


can we install qtp on server machine and do automation of application which is installed on client machine.If yes then how? If no then is there any other automation tool for this (client-server) senario.

4 Answers  


Categories