example-date format is 01-jan-09 in QTP.How to convert this
format to 01-01-09?
Answer Posted / kiran kallepu
please find below code
givenDate = "01-jan-09"
DD = Day(givenDate)
msgbox DD
MM= month(givenDate)
msgbox MM
YY=year(givenDate)
msgbox YY
sysdate=DD&"-"&MM&"-"&YY
msgbox sysdate
Is This Answer Correct ? | 8 Yes | 4 No |
Post New Answer View All Answers
How does you pass optional arguments in qtp?
When do go for loop condition in test?
I have written a code to fetch values fro access db and place in the fields. Iam using GetROProperty to fetch runtime values. Now i want to add runtime values to the access db in field v3. please help me. Its not writting in the db. Option explicit Dim con,rs,db,c Set con=createobject("adodb.connection") Set rs=createobject("adodb.recordset") con.Open "Driver={Microsoft Access Driver (*.mdb)};dbq=D:\Sales.mdb" rs.open "select * from tax",con Do while not rs.eof Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("incost").Set rs.fields("v1") Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("intax").Set rs.fields("v2") c=Browser("Sales Tax Calculator").Page("Sales Tax Calculator").WebEdit("outtax").GetROProperty("value") rs.MoveNext print c Loop Do while not rs.EOF rs.EditMode rs.Fields("v3").Value="3" rs.Update rs.MoveNext Loop Set rs=nothing Set con=nothing
What is the difference between run time object and test object in QTP?
What are the trigger events in qtp?
what is output value in QTP and how it can be used in automation testing
Tell me one scenario, the complex functionality you have automated in your project?
How to execute a winrunner script in quicktest professional (qtp)?
Why we use QTP ,We can use other tools like WR OrSilktest What r the options in Qtp that WR and Swilktest Does not have.
how will you load the test cases in ddt?
Is it possible to switch between recording modes during a test creation?
What is meant by a Check Point in UFT? Also, explain the applicable Check Points.
Which scripting language used by quicktest professional?
An action has both shared and local or associated to it and both have the same object in them. In the test which one will be considered?
In a flight window we have to enter the name and meal request for every passenger.In that window if we give Total passengers=1 then the Psngr1 name field and psngr1 meal request field will reflects.if we give Total passengers=2 then Psngr1 name field and psngr1 meal request field,Psngr2 name field and psngr2 meal request field and so on. how we can handle this scenerio thru Descriptive programming?