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 are the general steps involved in the data driven framework?
How to recognise the webelement and verifying that webelement is enabled?
Without integrating QC/Testdirector with QTP, is it possible to keep track of the defects?If yes how? How to export QTP results to an excel sheet?
What is the diff between image and bitmap check point?
What are the different attributes used with regular expression?
There are 10 rows in the datatable. How can we fetch 2 rows and then skip 3rd row. After that, pick 4th & 5th row and skip 6th row. Please share code
Hi, i run scripts in one machine those r passed.when i run the scripts in client side those r failed.Give me such a scenario when ever u faced?
what is error and fault in terms of software quality?
1.Qtp suppots Unix& linx or not 2why qtp suppots shell script.
What is synchronization point in QTP?
How to test background color and dynamic images during run time can you put the check point for moving objects?
Can UFT be connected to Quality Center? If ‘Yes’ brief the process or steps.
What is the quicktest professional testing process?
How do we handle run-time errors?
What is the virtual object?