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 the Exact Meaning of Environment Variables?

10 Answers   AppLabs,


What r types of parametarizations?

6 Answers  


How to compare 2 excel files using QTP? How to compare 2 PDF files using QTP?

1 Answers  


Hi All. Can you please explaing what is checkpoint? How it Will Work? what is meaning of "check checkpoint ("proprtname").how it will compate with expected value? Thanks in Advance............... Lakshmi

3 Answers   ITC Infotech, TCS,


I am in need of some set of QTP FAQ @ interview. Also recently in one of interview portal they asked me how you write the script for Login application which it is web -based and using Descriptive Programming? Without associating the shared object repository?Please i do need this answer very soon? Please respond me soon @ vaisu72@yahoo.com

2 Answers  






hw to create a frame work in qtp..what are the basic steps

2 Answers   Infosys,


Explain different types of action in qtp?

0 Answers  


in qtp 3 sheets is there in data table like global, action1, action2. I want to check the rows and columns in action2. how can check using script?

2 Answers   Polaris,


How to use output values in qtp ?

0 Answers  


How to create an instance in QTP?

1 Answers   Collabera,


How QA specialist can identify when programmatic descriptions are useful?

0 Answers  


How do function returns a value?How can we pass one function value to other function as input

3 Answers  


Categories