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

Answer Posted / rajendra

Please find code below:

'get date
StrDay=Day(now)
'get Month
StrMon=Month(now)
'get Year
'Stryear=year(now)

' Assemble the Date according to the ur requirement ( ex:01-
01-2010)
ExpDate=StrDay&"-"&StrMon&"-"&'Stryear
msgbox ExpDate

Is This Answer Correct ?    1 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is keyword driven testing in qtp?n how is it useful?

1493


write script for bitmap image?

1545


Explain the differences between table and db checkpoints?

583


write a script to verify the image path(src property) of the images which are in web pages.

1811


Hi All, How to Compare two strings character by character in QTP

955






What are the types of environment variables in qtp?

546


What is the extension of the qtp local repository?

568


Explain about datafile/verification of date file when file is not available in local system?

2229


What are the benefits of quick test pro(qtp)?

562


1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?

991


How to find Operating system information using QTP script?

578


What is the parameterization?

581


Which HTML specification will be adhered to? How strictly? What variations will be allowed for targeted browsers?

561


Explain in brief about the quicktest professional automation object model?

517


What is the difference between call to existing action and copy of an action?

605