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


Please Help Members By Posting Answers For Below Questions

How does you pass optional arguments in qtp?

559


When do go for loop condition in test?

654


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

1476


What is the difference between run time object and test object in QTP?

560


What are the trigger events in qtp?

570






what is output value in QTP and how it can be used in automation testing

1432


Tell me one scenario, the complex functionality you have automated in your project?

1471


How to execute a winrunner script in quicktest professional (qtp)?

510


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.

1849


how will you load the test cases in ddt?

1592


Is it possible to switch between recording modes during a test creation?

588


What is meant by a Check Point in UFT? Also, explain the applicable Check Points.

702


Which scripting language used by quicktest professional?

526


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?

648


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?

1434