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
Can the user toggle between using Local OR and shared OR for the same action?
What is optional step in qtp? How you can add optional step in qtp?
Suggest and Define a solution for an application whose objects are not recognized by UFT?
How do I generate Test Results window using descriptive method ( run time ) after my test execution process? Please have a look of my below code. ========================================================= Dim qtApp Dim qtTest Dim qtResultsOpt Set qtApp = CreateObject("QuickTest.Application") qtApp.Launch qtApp.Visible = True qtApp.Options.Run.CaptureForTestResults = "Always" qtApp.Options.Run.RunMode = "Fast" qtApp.Options.Run.ViewResults = True qtApp.Open "C:\Automation\Example", True Set qtTest = qtApp.Test qtTest.Settings.Run.OnError = "NextStep" Set qtResultsOpt = CreateObject ("QuickTest.RunResultsOptions") qtResultsOpt.ResultsLocation = "C:\Automation\Example\Res1" qtTest.Run qtResultsOpt MsgBox qtTest.LastRunResults.Status qtTest.Close Set qtResultsOpt = Nothing Set qtTest = Nothing Set qtApp = Nothing ========================================================== This code is working fine, but Test Result window is not displaying after execution. Anybody can please help me regading the same. Thanks Akshaya Madali Capgemini India Pvt Ltd 9823213538
What is QTP’s model for test creation?
Step 3&4 are repeated until an the object in recognised uniquely.
Which scripting language used by quicktest professional?
How do you perform Regreession Testing?
What is the use of sendkeys and what are send keys
How you can replace string in qtp?
hi all can any body explain how to write the script for finding the mandatory fields which are having [red Astrik sign (*)]
Hello, Is there any way to send the test results in html format (or any other) by email using outlook after the test run ends? thank you in advance
What is debugging? How you debug your script?
Explain different types of action in qtp?
How do you compare the structure of 2 tables in database and check whether they are similar using qtp.