How can we add regular expression for date field
(dd/mon/yyyy)?

Answers were Sorted based on User's Feedback



How can we add regular expression for date field (dd/mon/yyyy)?..

Answer / vengi

Open Object Repository
and selsct value ,
click on constant value,
it displays on edit box with Regular Expressionchecbox,
select check point
and enter values
For example: for data field(DD/MM/YYYY)
RE:[0-3][0-9]/[0-1][0-2]/[0-2][0-9][0-9][0-9]

Is This Answer Correct ?    11 Yes 11 No

How can we add regular expression for date field (dd/mon/yyyy)?..

Answer / samiran sil

"sDate" is the normal date-

sDay=Datepart("d",sDate)
sMonth = Datepart("m",sDate)
sYear = Datepart("yyyy",sDate)
If Len(sDay) = 1 Then
sDay = "0" & sDay
End If
If Len(sMonth) = 1 Then
sMonth = "0" & sMonth
End If
sDate = sMonth & "/" & sDay & "/" & sYear

Is This Answer Correct ?    2 Yes 2 No

How can we add regular expression for date field (dd/mon/yyyy)?..

Answer / shivani

for dd/mon/yyyy format--> [0-3][0-9]/[a-z]|[A-Z]/[a-z]|[A-
Z]/[a-z]|[A-Z]/[0-2][0-9][0-9][0-9]

Is This Answer Correct ?    8 Yes 13 No

Post New Answer

More QTP Interview Questions

What is use of object spy?

0 Answers  


can u write Script to do Data Driven Testing throuh Externel & internel XL Sheet

2 Answers   Relq,


Hello Everybody, How to maintain the page state in QTP. My scenario is: 1. I opened a notepad file. 2. Entered some text in the notepad file. 3.And changed the font type and color of the notepad file. And saved that. 4.Now next time when I will open the notepad it is showing the changed font type and color, rather than the default values. Please provide the code. Thanks, Gaytri

5 Answers  


Could anyone please tell me one situation where you have used recovery scenarion in real time with an example?

4 Answers  


What are the Automation Limitations??

1 Answers  






hi, i am trying to capture "web element" names in a web page, and i written the code like this,, with Browser("title:=") with .page("") .webelement("htmltag:=...").getroproperty("innertext") end with end with //////////////////////////////////////////////////////////////////////////////////// QTP RETURN ERROR like this: " object's description matches more than one of the objects currently displayed in your application. Add additional properties to the object description in order to uniquely identify the object" ok fine , i need to search another property other than "index" i use all the properties like class,text,innerhtml,innertext,visible=true,x , y,abs x ,abs y...but qtp returns error ..... in this webpage index is difficult to find? how to solve

1 Answers   IBM,


How to Import the data from MS-Access in QTP?

1 Answers  


Give the syntax to load function at run time.

0 Answers  


How can you close the second opened browser?

0 Answers  


what testplan contents and what test strategy contents,what is the diff b/w them

0 Answers  


How to record & run on Japanese language application using english version of QTP ???

4 Answers   ABC,


What is SQL injection?

2 Answers   CTS,


Categories