example-date format is 01-jan-09 in QTP.How to convert this
format to 01-01-09?

Answer Posted / harish

val = "01-jan-09"
Conv_Val = cdate(val)
msgbox Conv_Val

newvalue = replace(Conv_Val,"/","-")


values = split(replace(newvalue,right(newvalue,4),right(newvalue,2)),"-")

for i = 0 to ubound (values)

if Len(values(i)) <2 then
temp = temp & "0" & values(i) & "-"
Else
temp = temp & values(i)
End If
Next

msgbox temp

'Result : "01-01-09"

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to open a new test using quicktest professional (qtp)?

533


How the exception handling can be done using quicktest professional (qtp)?

571


Explain the differences between table and db checkpoints?

583


Explain the Different types of QTP test assets and their extensions?

605


How many types of parameters are available in quicktest professional (qtp)?

585






I am trying to install QTP 9.5 but i am getting error message saying that ("Path is \QuickTest Professional\bin\vb_init.exe") vb_init.exe file is not find. can anybody give me the advise what to do ?

1767


How do you create new test sets in td?

531


I am sathish , i want to test the Application of JIL.org ,Mobile Emulator ,by using QTP10.0. I am trying to do testing on that Application , but Child Objects are not identified by the QTP. Please can any one help me

1424


If the weblist is identified as webelement,and by clicking on webelement if the values are displayed,and if the values the values also identified as webelement.then how to fetch the values through script?

4697


can any boby tell me what is method or steps to connect the remote desk top by using QTP 9.2 version?

1625


What is QTP scenario.

1734


What is post recovery scenario?

1651


Give me some real time point of way where exactly we can conduct audits?

1501


How the exception handling can be done using quicktest professional?

545


distinguish between old version and new version QTP features.

1865