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
what is vmodel?advantages and disadvantages of vmodel?
Can the user toggle between using Local OR and shared OR for the same action?
Can any one tell me how to write a script for selecting open option in File menu of A word document.here you have to add objects to OR.try like that and give me the ans.i asked this question to so many but no one knows.if any one know the answer plz let me know
give me the code to save all messages of inbox of gmail into a folder and notepad
Explain in brief about the qtp automation object model (aom).
1--How many functions u develop 2--What is an array 3-- where is ur server 4--U involved in unit testing 5--how ur test the background colour using QTP
when will you do debug your script? and explain that process?
Explain the use of action split in qtp?
Hi, How Accessibility checkpoint in QTP can be implemented in the test script?
Explain qtp(quick test professional)?
In qtp is it possible to check broken links of a page?
Suppose I have three hyperlinks with same properties. How to solve this and what are the ways to solve this. we can solve this by using index property but what are the other ways we have have to solve this problem. Login (href: btnlogin.aspx) Login (href: Sourcelogin.aspx) Login (href: homelogin.aspx)
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?
How Can I find the least value in a bunch of variables using qtp.. E.g.:- A = 210, B = 212, C = 60, D = 111 I don’t want to write bunch of lines for this…. Is there a way to get the result in one line…..
What is the expert view?