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
Plz Explain AUTOMATION REFERENCE MODEL?
How you calling actions in qtp?
How to associate function library at a run time?
before launching qtp, we need to close all the open browsers u dont know what are all the browsers either it might be ie,mozilla etc and u dont know how many brosers are open.... u need to close all these before launching qtp.. can anyone plz temme d solution...
i have an external excel datasheet where it only contains 3 rows. after qtp executed the code to import the datasheet, the datatable getrowcount method now gives me a different value, lets say 60,000+ instead of only 3. i did not have any values starting from row 4 of my excel file. why is this happening? this also results to the qtp report to load for a very long time.
How you are developing the script? Using record and play back or manual?
i am trying to automate yatra.com,in that site, when i go to automate the Leaving from field showing as a WEBEDIT, but when i enter 1 or 2 char, it displaying dropdownlist, i try to use keyboard automation to select the item from that list but it is not possible, can anybody help he. Thans for posting the Answer
how to find that a file has been completely downloaded or not? I told that "download Complete" pop up. but he told the tool doesn't recognize the pop up
how to convert 100 into hundred repees only and viceversa
Can we record an application running on a remote machine using qtp?
An action has both shared and local OR associated with it and both have the same object in them. In the test which one will be considered?
can anyone tell me what to say in interview when interviewer asks about "tell me about your framework in your project"?
regular expression in qtp standar check point for months from accepting months from january to december only
What is difference between design time and run time data table?
I have two For loop, first For loop does is creates a customer and input the customer info and then the second for loop within the first for loop does the follows which is capture the customer name and verify the with the data within the datatable. The problem I am coming across is that when it goes through the second time creating another customer and then verify the second customer then it creates the following during runtime. I want is to have the customer2 below Customer1 under the Customer_from_Apps. Any help will be greatly appreciate it. Customer Customer_from_Apps Customer_from_Apps1 Customer1 Customer 1 Customer2 Customer2 Window("Customer Desktop").Window("Customer Tracking (Privacy").WinObject("TreeView20WndClass").Click 92,244 runtimevalue = .VbTreeView("vbname:=AppServerTree").GetROProperty("Selectio n") Customer_Val= Datatable.GlobalSheet.AddParameter ("Customer_from_Apps",runtimevalue) row=datatable.getsheet("Global").GetRowCount For x=1 to row datatable.SetCurrentRow(x) Data_Val=Datatable.Value("Customer",dtGlobalSheet) If (trim(Customer_Val)=trim(Data_Val)) Then Reporter.ReportEvent micPass, "Customer validation successful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val else Reporter.ReportEvent micFail, "Cusotmer validation unsuccessful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val End If Next