Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to write regular expression for Date field?

Answers were Sorted based on User's Feedback



how to write regular expression for Date field?..

Answer / raghu

To apply Regular expression for Date we have to split months
1) [0][1-9] because it accepts 01,02,...09 as months

2) [1][1-2] and this is for 10th,11th, 12th months

Now The Regular expression for whole date format is as follows

Example MM/DD/YY

[0][1-9][/][0-9][0-9][/][0-9][0-9] for 1 to 9 months
[1][1-2][/][0-9][0-9][/][0-9][0-9] for 10 to 12 months

Is This Answer Correct ?    0 Yes 0 No

how to write regular expression for Date field?..

Answer / ratikanta

[0][1-9]|[1-2][0-9]|[3][0-1]-[0][1-9]|[1][0-2]-[1-9][0-9][0-9][0-9]

Is This Answer Correct ?    0 Yes 0 No

how to write regular expression for Date field?..

Answer / naresh

30/12/12 format


(0-3)(0-3)/(0-1)(0-9)/(0-9)(0-9)

Is This Answer Correct ?    0 Yes 0 No

how to write regular expression for Date field?..

Answer / biswarup

dd-mm-yy format then it will be

[[0-3][0-9]]&&[^3[2-9]^00]-[[01][0-9]]&&[^1[3-9]^00]-\d{2}

please rectify me if you find it to be incorrect or with
some minor error, as i'm not completely sure about the part
after '&&', i mean, the error is not in the logic but in the
syntax of using the AND and OR operators.

Is This Answer Correct ?    7 Yes 8 No

how to write regular expression for Date field?..

Answer / rajesh

[1-9]|1[0-2]/[1-9]|[1-2][0-9]|3[0-1]/19[0-9][0-9]|2[0-9][0-9][0-9]

This works for 1900 to 2999

Is This Answer Correct ?    0 Yes 1 No

how to write regular expression for Date field?..

Answer / rajesh vanamala

MM/DD/YYYY

[0][1-9]|[1][0-2]/[0][1-9]|[1][0-9]|[2][0-9]|[3][0-1]/[1-9][0-9][0-9][0-9]

Is This Answer Correct ?    1 Yes 2 No

how to write regular expression for Date field?..

Answer / a kiran kumar

for example date formate is dd/mm/yy
than [0-3][0-9]/[0-1][0-2]/[0-9][0-9]

Is This Answer Correct ?    14 Yes 18 No

how to write regular expression for Date field?..

Answer / sow

[0-3][0-1]/[0-1][0-2]/200[0-9]

This would take only 2001 to 2009. It will not accept 1999.

Is This Answer Correct ?    2 Yes 7 No

how to write regular expression for Date field?..

Answer / ashok

For example date format is dd/mm/yy

than [0-3][0-9]/[0-1][0-9]/[0-9][0-9]

Is This Answer Correct ?    4 Yes 15 No

how to write regular expression for Date field?..

Answer / satyanarayana

If the date field is in the following format

'mm/dd/yy'
[0-1][0-9]/[0-3][0-9]/200[0-9]

Is This Answer Correct ?    4 Yes 17 No

Post New Answer

More QTP Interview Questions

How to make "TEST Batches" in manual testing . How it is possible plz explin in detail?

1 Answers  


Hi All, we are using QTP Automation Scripts to test SAP. I recorded QTP Automation Scripts in English-based SAP GUI. Now we have to test a French-based SAP sytem and use the same scripts. The QTP scripts are failing when executed on the French-based SAP System due to Object Recognition Issues. What can we do? Do I re-record the scripts in the French-based SAP system?

0 Answers  


for example one window is there, the window contains how many edit box's i want script? i know the script but that is not exact answer.... The script is like this .......... set a=description.creation() a("Native class")="WinEdit" b=window("Flight Reservation").childobject(a).count msgbox b

3 Answers  


What is the significance of “action 0” in qtp?

0 Answers  


what are the difference between qtp8.2 to 9.0 surya

1 Answers   Bally Technologies,


What test cases can you automate using QTP?

0 Answers  


WHY U CHOOSE TESTING FIELD?

6 Answers   CybAge, TCS,


hi i have one issue while selecting weblist i want show one particalur item in weblist .ex one weblist they are monday to sunday i want show the reporter like thurday in particular weblist can you help me about this thanks balaji

5 Answers  


what is main diff of qtp8.2 and qtp9.0?

1 Answers   Covansys,


What are the differences between quicktest professional (qtp) and winrunner?

0 Answers  


What is the difference between "call" and "callclose"

1 Answers   Polaris,


what is the use of Text output value in Qtp?

2 Answers  


Categories